├── TODO ├── dist ├── css │ └── .gitkeep ├── js │ └── .gitkeep ├── pce-macplus-gen.html ├── pce-macplus-mob.html ├── pce-macplus-big.html ├── pce-macplus-lite.html └── pce-macplus-ext.html ├── version ├── commonjs ├── pcejs-atarist │ ├── lib │ │ └── .keep │ ├── .gitignore │ ├── .npmignore │ ├── prepublish.sh │ ├── umd.sh │ ├── index.js │ └── package.json ├── pcejs-ibmpc │ ├── lib │ │ └── .keep │ ├── .gitignore │ ├── .npmignore │ ├── prepublish.sh │ ├── umd.sh │ ├── index.js │ └── package.json ├── pcejs-macplus │ ├── lib │ │ └── .keep │ ├── .gitignore │ ├── example │ │ ├── .gitignore │ │ ├── build.sh │ │ ├── index.js │ │ └── index.html │ ├── example-umd │ │ ├── .gitignore │ │ ├── index.js │ │ └── index.html │ ├── .npmignore │ ├── prepublish.sh │ ├── umd.sh │ ├── index.js │ └── package.json ├── pcejs-util │ ├── .npmignore │ ├── umd.sh │ └── package.json ├── umd.sh ├── publish-all.sh ├── epilogue.js ├── module-wrapper.js ├── prepublish.sh └── prelude.js ├── example ├── ibmpc │ └── .gitignore └── macplus │ ├── .gitignore │ ├── dc.dsk │ ├── 800K.dsk │ └── kidpix.dsk ├── AUTHORS ├── scripts ├── 21-remake.sh ├── 20-make.sh ├── a0-clean.sh ├── native_env.sh ├── 10-configure.sh ├── pcejs_build_conf_default.sh └── 30-afterbuild.sh ├── autogen.sh ├── src ├── arch │ ├── ibmpc │ │ ├── bios │ │ │ ├── pcex.rom │ │ │ └── Makefile.inc │ │ ├── msg.h │ │ ├── pceutils │ │ │ ├── pceexit.asm │ │ │ ├── pcestop.asm │ │ │ └── Makefile.inc │ │ ├── int13.h │ │ ├── m24.h │ │ ├── cmd.h │ │ └── main.h │ ├── macplus │ │ ├── pcex │ │ │ ├── pcex.rom │ │ │ └── Makefile.inc │ │ ├── traps.h │ │ ├── msg.h │ │ ├── iwm-io.h │ │ ├── hook.h │ │ ├── hotkey.h │ │ └── cmd_68k.h │ ├── Makefile.inc │ ├── sim6502 │ │ ├── pce-sim6502.cfg.in │ │ └── main.h │ ├── sims32 │ │ ├── pce-sims32.cfg.in │ │ ├── sercons.h │ │ └── cmd_s32.h │ ├── atarist │ │ ├── msg.h │ │ ├── main.h │ │ ├── rp5c15.h │ │ ├── cmd.h │ │ └── mem.h │ ├── rc759 │ │ ├── msg.h │ │ ├── main.h │ │ └── cmd.h │ ├── simarm │ │ └── pce-simarm.cfg.in │ └── sim405 │ │ └── sercons.h ├── cpu │ ├── Makefile.inc │ ├── e6502 │ │ └── Makefile.inc │ ├── sparc32 │ │ └── Makefile.inc │ ├── arm │ │ └── Makefile.inc │ ├── e68000 │ │ └── Makefile.inc │ ├── ppc405 │ │ └── Makefile.inc │ └── e8086 │ │ └── Makefile.inc ├── utils │ ├── Makefile.inc │ ├── pri │ │ ├── Makefile.inc │ │ └── main.h │ ├── pce-img │ │ ├── Makefile.inc │ │ └── pce-img.1 │ └── psi │ │ ├── Makefile.inc │ │ ├── info.h │ │ ├── delete.h │ │ ├── merge.h │ │ ├── edit.h │ │ ├── list.h │ │ ├── new.h │ │ ├── load.h │ │ ├── save.h │ │ ├── reorder.h │ │ └── comment.h ├── include │ └── pcedeps.h ├── Makefile.inc ├── drivers │ ├── Makefile.inc │ ├── pri │ │ ├── Makefile.inc │ │ ├── pri-img-tc.h │ │ ├── pri-img-pri.h │ │ ├── pri-img-pbit.h │ │ └── gcr-mac.h │ ├── block │ │ └── Makefile.inc │ ├── sound │ │ ├── Makefile.inc │ │ ├── sound-null.h │ │ ├── sound-oss.h │ │ └── sound-wav.h │ ├── video │ │ ├── Makefile.inc │ │ ├── font.h │ │ └── null.h │ ├── psi │ │ ├── psi-img-tc.h │ │ ├── psi-img-cp2.h │ │ ├── psi-img-xdf.h │ │ ├── psi-img-ana.h │ │ ├── psi-img-imd.h │ │ ├── psi-img-msa.h │ │ ├── psi-img-psi.h │ │ ├── psi-img-td0.h │ │ ├── psi-img-dc42.h │ │ ├── Makefile.inc │ │ ├── psi-img-stx.h │ │ └── psi-img-pfdc.h │ └── char │ │ ├── char-null.h │ │ ├── char-tios.h │ │ ├── char-pty.h │ │ ├── char-stdio.h │ │ ├── char-posix.h │ │ ├── Makefile.inc │ │ ├── char-tcp.h │ │ └── char-slip.h ├── devices │ ├── clock │ │ └── Makefile.inc │ ├── Makefile.inc │ └── video │ │ ├── Makefile.inc │ │ ├── olivetti.h │ │ └── wy700.h ├── chipset │ ├── 80186 │ │ └── Makefile.inc │ ├── clock │ │ └── Makefile.inc │ ├── ppc405 │ │ └── Makefile.inc │ ├── Makefile.inc │ └── 82xx │ │ └── Makefile.inc ├── libini │ └── Makefile.inc ├── lib │ ├── Makefile.inc │ ├── initerm.h │ ├── stdint │ │ └── stdint.h │ ├── tun.h │ ├── iniata.h │ ├── inidsk.h │ └── getopt.h └── config.inc.in ├── pcejs.sublime-project ├── package.json ├── README ├── doc ├── sound-drivers.txt ├── pce-macplus.txt ├── pce-atarist.txt ├── pbit-format.txt └── pce-ibmpc.txt ├── gendep ├── .gitignore └── libjs └── library_sdl.js /TODO: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/css/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/js/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | pce 0 2 2 scm 2 | -------------------------------------------------------------------------------- /commonjs/pcejs-atarist/lib/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /commonjs/pcejs-ibmpc/lib/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/lib/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/ibmpc/.gitignore: -------------------------------------------------------------------------------- 1 | bundle.js -------------------------------------------------------------------------------- /commonjs/pcejs-util/.npmignore: -------------------------------------------------------------------------------- 1 | umd.sh -------------------------------------------------------------------------------- /example/macplus/.gitignore: -------------------------------------------------------------------------------- 1 | bundle.js -------------------------------------------------------------------------------- /commonjs/pcejs-atarist/.gitignore: -------------------------------------------------------------------------------- 1 | lib/*.js 2 | *.rom -------------------------------------------------------------------------------- /commonjs/pcejs-ibmpc/.gitignore: -------------------------------------------------------------------------------- 1 | lib/*.js 2 | *.rom -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/.gitignore: -------------------------------------------------------------------------------- 1 | lib/*.js 2 | *.rom 3 | .cache -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Hampa Hug 2 | James Friend 3 | -------------------------------------------------------------------------------- /scripts/21-remake.sh: -------------------------------------------------------------------------------- 1 | make CFLAGS="$PCEJS_MAKE_CFLAGS" 2 | make install -------------------------------------------------------------------------------- /scripts/20-make.sh: -------------------------------------------------------------------------------- 1 | make clean 2 | make CFLAGS="$PCEJS_MAKE_CFLAGS" 3 | make install -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -f configure 4 | autoconf 5 | rm -rf autom4te.cache 6 | -------------------------------------------------------------------------------- /commonjs/pcejs-atarist/.npmignore: -------------------------------------------------------------------------------- 1 | umd.sh 2 | prepublish.sh 3 | pthread-main.js 4 | pce-*.worker.js -------------------------------------------------------------------------------- /commonjs/pcejs-ibmpc/.npmignore: -------------------------------------------------------------------------------- 1 | umd.sh 2 | prepublish.sh 3 | pthread-main.js 4 | pce-*.worker.js -------------------------------------------------------------------------------- /example/macplus/dc.dsk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-pce-gpl/pcejs/example/macplus/dc.dsk -------------------------------------------------------------------------------- /example/macplus/800K.dsk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-pce-gpl/pcejs/example/macplus/800K.dsk -------------------------------------------------------------------------------- /example/macplus/kidpix.dsk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-pce-gpl/pcejs/example/macplus/kidpix.dsk -------------------------------------------------------------------------------- /src/arch/ibmpc/bios/pcex.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-pce-gpl/pcejs/src/arch/ibmpc/bios/pcex.rom -------------------------------------------------------------------------------- /src/arch/macplus/pcex/pcex.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-pce-gpl/pcejs/src/arch/macplus/pcex/pcex.rom -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/example/.gitignore: -------------------------------------------------------------------------------- 1 | bundle.js 2 | hd1.qed 3 | macplus-system.zip 4 | pce-config.cfg 5 | .cache -------------------------------------------------------------------------------- /scripts/a0-clean.sh: -------------------------------------------------------------------------------- 1 | make clean 2 | rm -v Makefile Makefile.inc config.log config.status src/config.h src/config.inc -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/example-umd/.gitignore: -------------------------------------------------------------------------------- 1 | bundle.js 2 | hd1.qed 3 | macplus-system.zip 4 | pce-config.cfg 5 | .cache -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/.npmignore: -------------------------------------------------------------------------------- 1 | umd.sh 2 | prepublish.sh 3 | pthread-main.js 4 | pce-*.worker.js 5 | example/ 6 | example-umd/ -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/example/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | browserify index.js \ 3 | --ignore-missing \ 4 | > bundle.js -------------------------------------------------------------------------------- /src/cpu/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/cpu/Makefile.inc 2 | 3 | rel := src/cpu 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | -------------------------------------------------------------------------------- /src/arch/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/arch/Makefile.inc 2 | 3 | rel := src/arch 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | -------------------------------------------------------------------------------- /src/utils/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/utils/Makefile.inc 2 | 3 | rel := src/utils 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | -------------------------------------------------------------------------------- /scripts/native_env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export PATH=`node -e "require('util').puts(require('path').resolve('build-native/bin/'))"`:$PATH 3 | -------------------------------------------------------------------------------- /src/include/pcedeps.h: -------------------------------------------------------------------------------- 1 | 2 | #define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ 3 | #define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ -------------------------------------------------------------------------------- /commonjs/pcejs-util/umd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | browserify index.js \ 3 | --ignore-missing \ 4 | --standalone=PCEJSUtil \ 5 | > pcejs-util.umd.js -------------------------------------------------------------------------------- /commonjs/pcejs-atarist/prepublish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | PCEJS_DIR=$(git rev-parse --show-toplevel) 5 | 6 | "$PCEJS_DIR/commonjs/prepublish.sh" "$@" 7 | -------------------------------------------------------------------------------- /commonjs/pcejs-ibmpc/prepublish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | PCEJS_DIR=$(git rev-parse --show-toplevel) 5 | 6 | "$PCEJS_DIR/commonjs/prepublish.sh" "$@" 7 | -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/prepublish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | 5 | PCEJS_DIR=$(git rev-parse --show-toplevel) 6 | 7 | "$PCEJS_DIR/commonjs/prepublish.sh" "$@" 8 | -------------------------------------------------------------------------------- /commonjs/umd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | browserify index.js \ 3 | --noparse="pcejs-util.js" \ 4 | --ignore-missing \ 5 | --standalone=PCEJSUtil \ 6 | > pcejs-util.umd.js -------------------------------------------------------------------------------- /commonjs/pcejs-ibmpc/umd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | browserify index.js \ 3 | --noparse="pcejs-ibmpc.js" \ 4 | --ignore-missing \ 5 | --standalone=PCEJSIBMPC \ 6 | > pcejs-ibmpc.umd.js -------------------------------------------------------------------------------- /commonjs/pcejs-atarist/umd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | browserify index.js \ 3 | --noparse="pcejs-atarist.js" \ 4 | --ignore-missing \ 5 | --standalone=PCEJSAtariST \ 6 | > pcejs-atarist.umd.js -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/umd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | browserify index.js \ 3 | --noparse="pcejs-macplus.js" \ 4 | --ignore-missing \ 5 | --standalone=PCEJSMacplus \ 6 | > pcejs-macplus.umd.js -------------------------------------------------------------------------------- /src/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/Makefile.inc 2 | 3 | rel := src 4 | 5 | DCL += $(rel)/config.h $(rel)/config.inc 6 | DIRS += $(rel) 7 | DIST += $(rel)/Makefile.inc $(rel)/config.h.in $(rel)/config.inc.in 8 | -------------------------------------------------------------------------------- /src/drivers/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/drivers/Makefile.inc 2 | 3 | rel := src/drivers 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CLN += $(rel)/options.o 9 | DIST += $(rel)/options.c $(rel)/options.h 10 | 11 | $(rel)/options.o: $(rel)/options.c 12 | -------------------------------------------------------------------------------- /commonjs/publish-all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | declare -a PACKAGES=("pcejs-macplus" "pcejs-ibmpc" "pcejs-atarist" "pcejs-util") 5 | for pkgdir in "${PACKAGES[@]}"; do 6 | pushd "$pkgdir" 7 | npm version patch --no-git-tag-version 8 | npm publish . 9 | popd 10 | done 11 | -------------------------------------------------------------------------------- /scripts/10-configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | set -x 4 | 5 | $PCEJS_CONFIGURE \ 6 | CFLAGS="$PCEJS_CFLAGS" \ 7 | EMSCRIPTEN="$PCEJS_EMSCRIPTEN" \ 8 | --prefix="$PCEJS_PREFIX" \ 9 | --disable-rc759 --disable-sim405 --disable-sim6502 --disable-sims32 --disable-simarm \ 10 | --disable-char-termios --disable-char-tcp \ 11 | --without-x \ 12 | --with-sdl 13 | -------------------------------------------------------------------------------- /commonjs/pcejs-atarist/index.js: -------------------------------------------------------------------------------- 1 | var xtend = require('xtend') 2 | var pcejs = require('./lib/pcejs-atarist') 3 | 4 | var configOpts = { 5 | 'arguments': ['-c','pce-config.cfg','-r'], 6 | } 7 | 8 | module.exports = function (opts) { 9 | // inject dependencies and config 10 | var config = xtend(configOpts, opts) 11 | var deps = { 12 | extend: xtend, 13 | } 14 | return pcejs(deps, config) 15 | } -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/index.js: -------------------------------------------------------------------------------- 1 | var xtend = require('xtend') 2 | var pcejs = require('./lib/pcejs-macplus') 3 | 4 | var configOpts = { 5 | 'arguments': ['-c','pce-config.cfg','-r'], 6 | } 7 | 8 | module.exports = function (opts) { 9 | // inject dependencies and config 10 | var config = xtend(configOpts, opts) 11 | var deps = { 12 | extend: xtend, 13 | } 14 | return pcejs(deps, config) 15 | } -------------------------------------------------------------------------------- /commonjs/epilogue.js: -------------------------------------------------------------------------------- 1 | // expose apis 2 | 3 | typeof FS !== 'undefined' && (Module.FS = FS); 4 | typeof IDBFS !== 'undefined' && (Module.IDBFS = IDBFS); 5 | typeof NODEFS !== 'undefined' && (Module.NODEFS = NODEFS); 6 | typeof PATH !== 'undefined' && (Module.PATH = PATH); 7 | typeof ERRNO_CODES !== 'undefined' && (Module.ERRNO_CODES = ERRNO_CODES); 8 | typeof ERRNO_MESSAGES !== 'undefined' && (Module.ERRNO_MESSAGES = ERRNO_MESSAGES); 9 | -------------------------------------------------------------------------------- /commonjs/pcejs-ibmpc/index.js: -------------------------------------------------------------------------------- 1 | var xtend = require('xtend'); 2 | var pcejs = require('./lib/pcejs-ibmpc'); 3 | 4 | var configOpts = { 5 | arguments: ['-c', 'pce-config.cfg', '-r', '-g', 'vga'], 6 | }; 7 | 8 | module.exports = function (opts) { 9 | // inject dependencies and config 10 | var config = xtend(configOpts, opts); 11 | var deps = { 12 | extend: xtend, 13 | }; 14 | return pcejs(deps, config); 15 | }; 16 | -------------------------------------------------------------------------------- /scripts/pcejs_build_conf_default.sh: -------------------------------------------------------------------------------- 1 | PCEJS_conf_target="macplus" 2 | PCEJS_conf_emscripten="yes" 3 | PCEJS_conf_asmjs="yes" 4 | PCEJS_conf_wasm="yes" 5 | PCEJS_conf_optlvl="O3" 6 | PCEJS_conf_dbglvl="" 7 | PCEJS_conf_memory="128" 8 | PCEJS_conf_prefix="build" 9 | PCEJS_conf_packagedir="dist" 10 | PCEJS_conf_outputformat="js" 11 | PCEJS_conf_emsdkpath="" 12 | PCEJS_conf_outlining="" 13 | PCEJS_conf_worker="" 14 | PCEJS_conf_exportfuncs="" 15 | PCEJS_conf_threaded="" 16 | -------------------------------------------------------------------------------- /pcejs.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "path": ".", 6 | "folder_exclude_patterns": [ 7 | "build", 8 | "build-native", 9 | ], 10 | "file_exclude_patterns": [ 11 | "pcejs-*/lib/pcejs-*.js", 12 | "commonjs/pcejs-*/pce-*.worker.js", 13 | "example/*/pce-*.worker.js", 14 | "dist/pce-*.js", 15 | "example/*/bundle.js", 16 | "src/arch/*/pce-*", 17 | ], 18 | } 19 | ], 20 | } 21 | -------------------------------------------------------------------------------- /src/devices/clock/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/devices/clock/Makefile.inc 2 | 3 | rel := src/devices/clock 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | DEV_CLK_BAS := ds1743 9 | DEV_CLK_SRC := $(foreach f,$(DEV_CLK_BAS),$(rel)/$(f).c) 10 | DEV_CLK_OBJ := $(foreach f,$(DEV_CLK_BAS),$(rel)/$(f).o) 11 | DEV_CLK_HDR := $(foreach f,$(DEV_CLK_BAS),$(rel)/$(f).h) 12 | 13 | CLN += $(DEV_CLK_OBJ) 14 | DIST += $(DEV_CLK_SRC) $(DEV_CLK_HDR) 15 | 16 | $(rel)/ds1743.o: $(rel)/ds1743.c 17 | -------------------------------------------------------------------------------- /src/chipset/clock/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/chipset/clock/Makefile.inc 2 | 3 | rel := src/chipset/clock 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CS_CLK_BAS := ds1743 9 | CS_CLK_SRC := $(foreach f,$(CS_CLK_BAS),$(rel)/$(f).c) 10 | CS_CLK_OBJ := $(foreach f,$(CS_CLK_BAS),$(rel)/$(f).o) 11 | CS_CLK_HDR := $(foreach f,$(CS_CLK_BAS),$(rel)/$(f).h) 12 | 13 | CLN += $(CS_CLK_OBJ) 14 | DIST += $(CS_CLK_SRC) $(CS_CLK_HDR) 15 | 16 | $(rel)/ds1743.o: $(rel)/ds1743.c $(rel)/ds1743.h 17 | -------------------------------------------------------------------------------- /src/chipset/ppc405/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/chipset/ppc405/Makefile.inc 2 | 3 | rel := src/chipset/ppc405 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CS_PPC405_BAS := uic 9 | CS_PPC405_SRC := $(foreach f,$(CS_PPC405_BAS),$(rel)/$(f).c) 10 | CS_PPC405_OBJ := $(foreach f,$(CS_PPC405_BAS),$(rel)/$(f).o) 11 | CS_PPC405_HDR := $(foreach f,$(CS_PPC405_BAS),$(rel)/$(f).h) 12 | 13 | CLN += $(CS_PPC405_OBJ) 14 | DIST += $(CS_PPC405_SRC) $(CS_PPC405_HDR) 15 | 16 | $(rel)/uic.o: $(rel)/uic.c $(rel)/uic.h 17 | -------------------------------------------------------------------------------- /commonjs/module-wrapper.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | // emscripten expects an object called Module to be defined 3 | var Module = opts || {}; 4 | 5 | // hide node/commonjs globals so environment is not detected as node 6 | var process = void 0; 7 | var require = void 0; 8 | 9 | // [emscripten output goes here] 10 | 11 | // expose stuff which emscripten defines in this scope 12 | Module.FS = FS; 13 | Module.PATH = PATH; 14 | Module.IDBFS = IDBFS; 15 | Module.NODEFS = NODEFS; 16 | 17 | return Module; 18 | }; 19 | -------------------------------------------------------------------------------- /src/chipset/80186/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/chipset/80186/Makefile.inc 2 | 3 | rel := src/chipset/80186 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CS_80186_BAS := dma icu tcu 9 | CS_80186_SRC := $(foreach f,$(CS_80186_BAS),$(rel)/$(f).c) 10 | CS_80186_OBJ := $(foreach f,$(CS_80186_BAS),$(rel)/$(f).o) 11 | CS_80186_HDR := $(foreach f,$(CS_80186_BAS),$(rel)/$(f).h) 12 | 13 | CLN += $(CS_80186_OBJ) 14 | DIST += $(CS_80186_SRC) $(CS_80186_HDR) 15 | 16 | $(rel)/dma.o: $(rel)/dma.c $(rel)/dma.h 17 | $(rel)/icu.o: $(rel)/icu.c $(rel)/icu.h 18 | $(rel)/tcu.o: $(rel)/tcu.c $(rel)/tcu.h 19 | -------------------------------------------------------------------------------- /commonjs/pcejs-util/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pcejs-util", 3 | "description": "Utils for pcejs emulator for the browser", 4 | "keywords": [ 5 | "emulator", 6 | "browserify" 7 | ], 8 | "author": "James Friend", 9 | "version": "0.2.2", 10 | "licenses": [ 11 | { 12 | "type": "GPL", 13 | "url": "https://raw.github.com/jsdf/pce/master/COPYING" 14 | } 15 | ], 16 | "scripts": { 17 | "prepublish": "./umd.sh" 18 | }, 19 | "homepage": "https://github.com/jsdf/pce", 20 | "bugs": "https://github.com/jsdf/pce/issues", 21 | "repository": { 22 | "type": "git", 23 | "url": "git://github.com/jsdf/pce.git" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/example-umd/index.js: -------------------------------------------------------------------------------- 1 | // add a loading progress bar. not required, but good ux 2 | var loadingStatus = PCEJSUtil.loadingStatus( 3 | document.querySelector('.pcejs-loading-status') 4 | ); 5 | 6 | PCEJSMacplus({ 7 | arguments: ['-c', 'pce-config.cfg', '-r'], 8 | autoloadFiles: [ 9 | 'macplus-pcex.rom', 10 | 'mac-plus.rom', 11 | 'hd1.qed', 12 | 'pce-config.cfg', 13 | ], 14 | print: console.log.bind(console), 15 | printErr: console.warn.bind(console), 16 | canvas: document.querySelector('.pcejs-canvas'), 17 | monitorRunDependencies: function(remainingDependencies) { 18 | loadingStatus.update(remainingDependencies); 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /src/cpu/e6502/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/cpu/e6502/Makefile.inc 2 | 3 | rel := src/cpu/e6502 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CPU_6502_BAS := disasm e6502 ea opcodes 9 | CPU_6502_SRC := $(foreach f,$(CPU_6502_BAS),$(rel)/$(f).c) 10 | CPU_6502_OBJ := $(foreach f,$(CPU_6502_BAS),$(rel)/$(f).o) 11 | CPU_6502_HDR := $(foreach f,e6502 internal,$(rel)/$(f).h) 12 | CPU_6502_ARC := $(rel)/e6502.a 13 | 14 | CLN += $(CPU_6502_ARC) $(CPU_6502_OBJ) 15 | DIST += $(CPU_6502_SRC) $(CPU_6502_HDR) 16 | 17 | $(rel)/disasm.o: $(rel)/disasm.c 18 | $(rel)/e6502.o: $(rel)/e6502.c 19 | $(rel)/ea.o: $(rel)/ea.c 20 | $(rel)/opcodes.o: $(rel)/opcodes.c 21 | 22 | $(rel)/e6502.a: $(CPU_6502_OBJ) 23 | -------------------------------------------------------------------------------- /src/chipset/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/chipset/Makefile.inc 2 | 3 | rel := src/chipset 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CHIPSET_BAS := e6522 e6850 e68901 e8530 wd179x 9 | CHIPSET_SRC := $(foreach f,$(CHIPSET_BAS),$(rel)/$(f).c) 10 | CHIPSET_OBJ := $(foreach f,$(CHIPSET_BAS),$(rel)/$(f).o) 11 | CHIPSET_HDR := $(foreach f,$(CHIPSET_BAS),$(rel)/$(f).h) 12 | 13 | CLN += $(CHIPSET_OBJ) 14 | DIST += $(CHIPSET_SRC) $(CHIPSET_HDR) 15 | 16 | $(rel)/e6522.o: $(rel)/e6522.c $(rel)/e6522.h 17 | $(rel)/e6850.o: $(rel)/e6850.c $(rel)/e6850.h 18 | $(rel)/e68901.o: $(rel)/e68901.c $(rel)/e68901.h 19 | $(rel)/e8530.o: $(rel)/e8530.c $(rel)/e8530.h 20 | $(rel)/wd179x.o: $(rel)/wd179x.c $(rel)/wd179x.h 21 | -------------------------------------------------------------------------------- /src/cpu/sparc32/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/cpu/sparc32/Makefile.inc 2 | 3 | rel := src/cpu/sparc32 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CPU_SPARC32_BAS := disasm mmu opcodes sparc32 9 | CPU_SPARC32_SRC := $(foreach f,$(CPU_SPARC32_BAS),$(rel)/$(f).c) 10 | CPU_SPARC32_OBJ := $(foreach f,$(CPU_SPARC32_BAS),$(rel)/$(f).o) 11 | CPU_SPARC32_HDR := $(foreach f,sparc32 internal,$(rel)/$(f).h) 12 | CPU_SPARC32_ARC := $(rel)/sparc32.a 13 | 14 | CLN += $(CPU_SPARC32_ARC) $(CPU_SPARC32_OBJ) 15 | DIST += $(CPU_SPARC32_SRC) $(CPU_SPARC32_HDR) 16 | 17 | $(rel)/disasm.o: $(rel)/disasm.c 18 | $(rel)/mmu.o: $(rel)/mmu.c 19 | $(rel)/opcodes.o: $(rel)/opcodes.c 20 | $(rel)/sparc32.o: $(rel)/sparc32.c 21 | 22 | $(rel)/sparc32.a: $(CPU_SPARC32_OBJ) 23 | -------------------------------------------------------------------------------- /commonjs/pcejs-atarist/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pcejs-atarist", 3 | "description": "Atari ST emulator for the browser", 4 | "keywords": [ 5 | "emulator", 6 | "browserify" 7 | ], 8 | "author": "James Friend", 9 | "version": "0.2.2", 10 | "dependencies": { 11 | "xtend": "^3.0.0" 12 | }, 13 | "licenses": [ 14 | { 15 | "type": "GPL", 16 | "url": "https://raw.github.com/jsdf/pce/master/COPYING" 17 | } 18 | ], 19 | "scripts": { 20 | "prepublish": "./prepublish.sh atarist && ./umd.sh" 21 | }, 22 | "homepage": "https://github.com/jsdf/pce", 23 | "bugs": "https://github.com/jsdf/pce/issues", 24 | "repository": { 25 | "type": "git", 26 | "url": "git://github.com/jsdf/pce.git" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/example/index.js: -------------------------------------------------------------------------------- 1 | var macplus = require('../'); 2 | var utils = require('../../pcejs-util'); 3 | 4 | // add a loading progress bar. not required, but good ux 5 | var loadingStatus = utils.loadingStatus( 6 | document.querySelector('.pcejs-loading-status') 7 | ); 8 | 9 | macplus({ 10 | arguments: ['-c', 'pce-config.cfg', '-r'], 11 | autoloadFiles: [ 12 | 'macplus-pcex.rom', 13 | 'mac-plus.rom', 14 | 'hd1.qed', 15 | 'pce-config.cfg', 16 | ], 17 | print: console.log.bind(console), 18 | printErr: console.warn.bind(console), 19 | canvas: document.querySelector('.pcejs-canvas'), 20 | monitorRunDependencies: function(remainingDependencies) { 21 | loadingStatus.update(remainingDependencies); 22 | }, 23 | }); 24 | -------------------------------------------------------------------------------- /src/cpu/arm/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/cpu/arm/Makefile.inc 2 | 3 | rel := src/cpu/arm 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CPU_ARM_BAS := arm copr14 copr15 disasm mmu opcodes 9 | CPU_ARM_SRC := $(foreach f,$(CPU_ARM_BAS),$(rel)/$(f).c) 10 | CPU_ARM_OBJ := $(foreach f,$(CPU_ARM_BAS),$(rel)/$(f).o) 11 | CPU_ARM_HDR := $(foreach f,arm internal,$(rel)/$(f).h) 12 | CPU_ARM_ARC := $(rel)/arm.a 13 | 14 | CLN += $(CPU_ARM_ARC) $(CPU_ARM_OBJ) 15 | DIST += $(CPU_ARM_SRC) $(CPU_ARM_HDR) 16 | 17 | $(rel)/arm.o: $(rel)/arm.c 18 | $(rel)/copr14.o: $(rel)/copr14.c 19 | $(rel)/copr15.o: $(rel)/copr15.c 20 | $(rel)/disasm.o: $(rel)/disasm.c 21 | $(rel)/mmu.o: $(rel)/mmu.c 22 | $(rel)/opcodes.o: $(rel)/opcodes.c 23 | 24 | $(rel)/arm.a: $(CPU_ARM_OBJ) 25 | -------------------------------------------------------------------------------- /src/chipset/82xx/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/chipset/82xx/Makefile.inc 2 | 3 | rel := src/chipset/82xx 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CS_82XX_BAS := e8237 e8250 e8253 e8255 e8259 e8272 9 | CS_82XX_SRC := $(foreach f,$(CS_82XX_BAS),$(rel)/$(f).c) 10 | CS_82XX_OBJ := $(foreach f,$(CS_82XX_BAS),$(rel)/$(f).o) 11 | CS_82XX_HDR := $(foreach f,$(CS_82XX_BAS),$(rel)/$(f).h) 12 | 13 | CLN += $(CS_82XX_OBJ) 14 | DIST += $(CS_82XX_SRC) $(CS_82XX_HDR) 15 | 16 | $(rel)/e8237.o: $(rel)/e8237.c $(rel)/e8237.h 17 | $(rel)/e8250.o: $(rel)/e8250.c $(rel)/e8250.h 18 | $(rel)/e8253.o: $(rel)/e8253.c $(rel)/e8253.h 19 | $(rel)/e8255.o: $(rel)/e8255.c $(rel)/e8255.h 20 | $(rel)/e8259.o: $(rel)/e8259.c $(rel)/e8259.h 21 | $(rel)/e8272.o: $(rel)/e8272.c $(rel)/e8272.h 22 | -------------------------------------------------------------------------------- /commonjs/pcejs-ibmpc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pcejs-ibmpc", 3 | "description": "IBM PC/XT emulator for the browser", 4 | "keywords": [ 5 | "emulator", 6 | "browserify" 7 | ], 8 | "author": "James Friend", 9 | "version": "0.2.2", 10 | "dependencies": { 11 | "xtend": "^3.0.0" 12 | }, 13 | "licenses": [ 14 | { 15 | "type": "GPL", 16 | "url": "https://raw.github.com/jsdf/pce/master/COPYING" 17 | } 18 | ], 19 | "scripts": { 20 | "prepublish": "./prepublish.sh ibmpc && ./umd.sh" 21 | }, 22 | "homepage": "https://github.com/jsdf/pce", 23 | "bugs": { 24 | "url": "https://github.com/jsdf/pce/issues" 25 | }, 26 | "repository": { 27 | "type": "git", 28 | "url": "git://github.com/jsdf/pce.git" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/cpu/e68000/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/cpu/e68000/Makefile.inc 2 | 3 | rel := src/cpu/e68000 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CPU_68K_BAS := cc disasm ea opcodes ops-020 e68000 9 | CPU_68K_SRC := $(foreach f,$(CPU_68K_BAS),$(rel)/$(f).c) 10 | CPU_68K_OBJ := $(foreach f,$(CPU_68K_BAS),$(rel)/$(f).o) 11 | CPU_68K_HDR := $(foreach f,e68000 internal,$(rel)/$(f).h) 12 | CPU_68K_ARC := $(rel)/e68000.a 13 | 14 | CLN += $(CPU_68K_ARC) $(CPU_68K_OBJ) 15 | DIST += $(CPU_68K_SRC) $(CPU_68K_HDR) 16 | 17 | $(rel)/cc.o: $(rel)/cc.c 18 | $(rel)/disasm.o: $(rel)/disasm.c 19 | $(rel)/ea.o: $(rel)/ea.c 20 | $(rel)/opcodes.o: $(rel)/opcodes.c 21 | $(rel)/ops-020.o: $(rel)/ops-020.c 22 | $(rel)/e68000.o: $(rel)/e68000.c 23 | 24 | $(rel)/e68000.a: $(CPU_68K_OBJ) 25 | -------------------------------------------------------------------------------- /src/libini/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/libini/Makefile.inc 2 | 3 | rel := src/libini 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | LIBINI_BAS := expr read scanner section strings value write 9 | LIBINI_SRC := $(foreach f,$(LIBINI_BAS),$(rel)/$(f).c) 10 | LIBINI_OBJ := $(foreach f,$(LIBINI_BAS),$(rel)/$(f).o) 11 | LIBINI_HDR := $(foreach f,libini scanner,$(rel)/$(f).h) 12 | LIBINI_ARC := $(rel)/libini.a 13 | 14 | CLN += $(LIBINI_ARC) $(LIBINI_OBJ) 15 | DIST += $(LIBINI_SRC) $(LIBINI_HDR) 16 | 17 | $(rel)/expr.o: $(rel)/expr.c 18 | $(rel)/read.o: $(rel)/read.c 19 | $(rel)/scanner.o: $(rel)/scanner.c 20 | $(rel)/section.o: $(rel)/section.c 21 | $(rel)/strings.o: $(rel)/strings.c 22 | $(rel)/value.o: $(rel)/value.c 23 | $(rel)/write.o: $(rel)/write.c 24 | 25 | $(rel)/libini.a: $(LIBINI_OBJ) 26 | -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pcejs-macplus", 3 | "description": "Mac Plus emulator for the browser", 4 | "keywords": [ 5 | "emulator", 6 | "browserify" 7 | ], 8 | "author": "James Friend", 9 | "version": "0.2.2", 10 | "dependencies": { 11 | "xtend": "^3.0.0" 12 | }, 13 | "licenses": [ 14 | { 15 | "type": "GPL", 16 | "url": "https://raw.github.com/jsdf/pce/master/COPYING" 17 | } 18 | ], 19 | "scripts": { 20 | "prepublish": "./prepublish.sh macplus && ./umd.sh" 21 | }, 22 | "homepage": "https://github.com/jsdf/pce", 23 | "bugs": "https://github.com/jsdf/pce/issues", 24 | "repository": { 25 | "type": "git", 26 | "url": "git://github.com/jsdf/pce.git" 27 | }, 28 | "devDependencies": { 29 | "browserify": "^16.5.1" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/utils/pri/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/utils/pri/Makefile.inc 2 | 3 | rel := src/utils/pri 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | PRI_BAS := main 9 | PRI_SRC := $(foreach f,$(PRI_BAS),$(rel)/$(f).c) 10 | PRI_OBJ := $(foreach f,$(PRI_BAS),$(rel)/$(f).o) 11 | PRI_HDR := $(foreach f,$(PRI_BAS),$(rel)/$(f).h) 12 | PRI_MAN1 := $(rel)/pri.1 13 | PRI_BIN := $(rel)/pri$(EXEEXT) 14 | 15 | PRI_OBJ_EXT := \ 16 | src/lib/getopt.o \ 17 | src/drivers/pri/pri.a \ 18 | src/drivers/psi/psi.a 19 | 20 | BIN += $(PRI_BIN) 21 | MAN1 += $(PRI_MAN1) 22 | CLN += $(PRI_BIN) $(PRI_OBJ) 23 | DIST += $(PRI_SRC) $(PRI_HDR) $(PRI_MAN1) 24 | 25 | $(rel)/main.o: $(rel)/main.c 26 | 27 | $(rel)/pri$(EXEEXT): $(PRI_OBJ_EXT) $(PRI_OBJ) 28 | $(QP)echo " LD $@" 29 | $(QR)$(LD) $(LDFLAGS_DEFAULT) -o $@ $(PRI_OBJ) $(PRI_OBJ_EXT) 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pcejs", 3 | "description": "classic personal computer emulators for the browser", 4 | "keywords": [ 5 | "emulator", 6 | "browserify" 7 | ], 8 | "author": "James Friend", 9 | "version": "0.1.0", 10 | "dependencies": { 11 | "browserify": "~4.1.5", 12 | "http-server": "^0.7.4", 13 | "xtend": "^4.0.0" 14 | }, 15 | "licenses": [ 16 | { 17 | "type": "GPL", 18 | "url": "https://raw.github.com/jsdf/pce/master/COPYING" 19 | } 20 | ], 21 | "scripts": { 22 | "prepublish": "./pcejs_build", 23 | "clean": "./pcejs_build clean" 24 | }, 25 | "homepage": "https://github.com/jsdf/pce", 26 | "bugs": "https://github.com/jsdf/pce/issues", 27 | "repository": { 28 | "type": "git", 29 | "url": "git://github.com/jsdf/pce.git" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/cpu/ppc405/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/cpu/ppc405/Makefile.inc 2 | 3 | rel := src/cpu/ppc405 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CPU_PPC405_BAS := disasm mmu opcode13 opcode1f opcodes ppc405 9 | CPU_PPC405_SRC := $(foreach f,$(CPU_PPC405_BAS),$(rel)/$(f).c) 10 | CPU_PPC405_OBJ := $(foreach f,$(CPU_PPC405_BAS),$(rel)/$(f).o) 11 | CPU_PPC405_HDR := $(foreach f,ppc405 internal,$(rel)/$(f).h) 12 | CPU_PPC405_ARC := $(rel)/ppc405.a 13 | 14 | CLN += $(CPU_PPC405_ARC) $(CPU_PPC405_OBJ) 15 | DIST += $(CPU_PPC405_SRC) $(CPU_PPC405_HDR) 16 | 17 | $(rel)/disasm.o: $(rel)/disasm.c 18 | $(rel)/mmu.o: $(rel)/mmu.c 19 | $(rel)/opcode13.o: $(rel)/opcode13.c 20 | $(rel)/opcode1f.o: $(rel)/opcode1f.c 21 | $(rel)/opcodes.o: $(rel)/opcodes.c 22 | $(rel)/ppc405.o: $(rel)/ppc405.c 23 | 24 | $(rel)/ppc405.a: $(CPU_PPC405_OBJ) 25 | -------------------------------------------------------------------------------- /src/devices/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/devices/Makefile.inc 2 | 3 | rel := src/devices 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | DEV_BAS := ata device fdc hdc memory nvram parport pci pci-ata serport slip 9 | DEV_SRC := $(foreach f,$(DEV_BAS),$(rel)/$(f).c) 10 | DEV_OBJ := $(foreach f,$(DEV_BAS),$(rel)/$(f).o) 11 | DEV_HDR := $(foreach f,$(DEV_BAS),$(rel)/$(f).h) 12 | 13 | CLN += $(DEV_OBJ) 14 | DIST += $(DEV_SRC) $(DEV_HDR) 15 | 16 | $(rel)/ata.o: $(rel)/ata.c 17 | $(rel)/device.o: $(rel)/device.c 18 | $(rel)/fdc.o: $(rel)/fdc.c 19 | $(rel)/hdc.o: $(rel)/hdc.c 20 | $(rel)/memory.o: $(rel)/memory.c 21 | $(rel)/nvram.o: $(rel)/nvram.c 22 | $(rel)/parport.o: $(rel)/parport.c 23 | $(rel)/pci.o: $(rel)/pci.c 24 | $(rel)/pci-ata.o: $(rel)/pci-ata.c 25 | $(rel)/serport.o: $(rel)/serport.c 26 | $(rel)/slip.o: $(rel)/slip.c 27 | -------------------------------------------------------------------------------- /src/cpu/e8086/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/cpu/e8086/Makefile.inc 2 | 3 | rel := src/cpu/e8086 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | CPU_8086_BAS := disasm e8086 e80186 e80286r flags ea opcodes pqueue 9 | CPU_8086_SRC := $(foreach f,$(CPU_8086_BAS),$(rel)/$(f).c) 10 | CPU_8086_OBJ := $(foreach f,$(CPU_8086_BAS),$(rel)/$(f).o) 11 | CPU_8086_HDR := $(foreach f,e8086 internal,$(rel)/$(f).h) 12 | CPU_8086_ARC := $(rel)/e8086.a 13 | 14 | CLN += $(CPU_8086_ARC) $(CPU_8086_OBJ) 15 | DIST += $(CPU_8086_SRC) $(CPU_8086_HDR) 16 | 17 | $(rel)/disasm.o: $(rel)/disasm.c 18 | $(rel)/e8086.o: $(rel)/e8086.c 19 | $(rel)/e80186.o: $(rel)/e80186.c 20 | $(rel)/e80286r.o: $(rel)/e80286r.c 21 | $(rel)/flags.o: $(rel)/flags.c 22 | $(rel)/ea.o: $(rel)/ea.c 23 | $(rel)/opcodes.o: $(rel)/opcodes.c 24 | $(rel)/pqueue.o: $(rel)/pqueue.c 25 | 26 | $(rel)/e8086.a: $(CPU_8086_OBJ) 27 | -------------------------------------------------------------------------------- /src/arch/sim6502/pce-sim6502.cfg.in: -------------------------------------------------------------------------------- 1 | # pce-sim6502.cfg 2 | # 3 | # Example config file 4 | 5 | section sim6502 { 6 | # Multiple "ram" sections may be present 7 | section ram { 8 | # The base address 9 | base = 0x0000 10 | 11 | # The size in bytes 12 | size = 0xe000 13 | 14 | # The RAM image that is used to initialize the RAM 15 | file = "sim6502.ram" 16 | } 17 | 18 | # Multiple "rom" sections may be present 19 | section rom { 20 | # The base address 21 | base = 0xf000 22 | 23 | # The rom size in bytes 24 | size = 0x1000 25 | 26 | # The file from which the rom code is loaded 27 | file = "sim6502.rom" 28 | } 29 | 30 | # load sections are processed after the emulator is set up. 31 | section load { 32 | format = "ihex" 33 | file = "sim6502.ihex" 34 | } 35 | 36 | section load { 37 | format = "binary" 38 | file = "rom.bin" 39 | base = 0xf000 40 | } 41 | 42 | section console { 43 | io = 0xe000 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/drivers/pri/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/drivers/pri/Makefile.inc 2 | 3 | rel := src/drivers/pri 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | DRV_PRI_BAS := \ 9 | gcr-mac \ 10 | mfm-ibm \ 11 | pri-img-pbit \ 12 | pri-img-pri \ 13 | pri-img-tc \ 14 | pri-img \ 15 | pri 16 | 17 | DRV_PRI_SRC := $(foreach f,$(DRV_PRI_BAS),$(rel)/$(f).c) 18 | DRV_PRI_OBJ := $(foreach f,$(DRV_PRI_BAS),$(rel)/$(f).o) 19 | DRV_PRI_HDR := $(foreach f,$(DRV_PRI_BAS),$(rel)/$(f).h) 20 | DRV_PRI_ARC := $(rel)/pri.a 21 | 22 | CLN += $(DRV_PRI_ARC) $(DRV_PRI_OBJ) 23 | DIST += $(DRV_PRI_SRC) $(DRV_PRI_HDR) 24 | 25 | $(rel)/gcr-mac.o: $(rel)/gcr-mac.c 26 | $(rel)/mfm-ibm.o: $(rel)/mfm-ibm.c 27 | $(rel)/pri-img-pbit.o: $(rel)/pri-img-pbit.c 28 | $(rel)/pri-img-pri.o: $(rel)/pri-img-pri.c 29 | $(rel)/pri-img-tc.o: $(rel)/pri-img-tc.c 30 | $(rel)/pri-img.o: $(rel)/pri-img.c 31 | $(rel)/pri.o: $(rel)/pri.c 32 | 33 | $(rel)/pri.a: $(DRV_PRI_OBJ) 34 | -------------------------------------------------------------------------------- /src/drivers/block/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/drivers/block/Makefile.inc 2 | 3 | rel := src/drivers/block 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | DEV_BLK_BAS := blkcow blkdosem blkpart blkpce blkpsi blkqed blkram blkraw block 9 | DEV_BLK_SRC := $(foreach f,$(DEV_BLK_BAS),$(rel)/$(f).c) $(DEV_BLK_PFDC_SRC) 10 | DEV_BLK_OBJ := $(foreach f,$(DEV_BLK_BAS),$(rel)/$(f).o) $(DEV_BLK_PFDC_OBJ) 11 | DEV_BLK_HDR := $(foreach f,$(DEV_BLK_BAS),$(rel)/$(f).h) $(DEV_BLK_PFDC_HDR) 12 | DEV_BLK_ARC := $(rel)/block.a 13 | 14 | CLN += $(DEV_BLK_ARC) $(DEV_BLK_OBJ) 15 | DIST += $(DEV_BLK_SRC) $(DEV_BLK_HDR) 16 | 17 | $(rel)/blkcow.o: $(rel)/blkcow.c 18 | $(rel)/blkdosem.o: $(rel)/blkdosem.c 19 | $(rel)/blkpart.o: $(rel)/blkpart.c 20 | $(rel)/blkpce.o: $(rel)/blkpce.c 21 | $(rel)/blkpsi.o: $(rel)/blkpsi.c 22 | $(rel)/blkqed.o: $(rel)/blkqed.c 23 | $(rel)/blkram.o: $(rel)/blkram.c 24 | $(rel)/blkraw.o: $(rel)/blkraw.c 25 | $(rel)/block.o: $(rel)/block.c 26 | 27 | $(rel)/block.a: $(DEV_BLK_OBJ) 28 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | PCE - PC Emulator 2 | ============================================================================== 3 | 4 | PCE is a collection of microcomputer emulators. 5 | 6 | For further information check out these files: 7 | 8 | doc/pce-ibmpc.txt 9 | PCE/ibmpc, an IBM PC 5150 emulator 10 | 11 | doc/pce-macplus.txt 12 | PCE/macplus, a Macintosh Plus emulator 13 | 14 | doc/keys.txt 15 | Key combinations to control the emulator 16 | 17 | doc/monitor.txt 18 | The monitor interface 19 | 20 | doc/messages.txt 21 | Messages to control the emulator 22 | 23 | 24 | Install 25 | ============================================================================== 26 | 27 | To install do: 28 | 29 | ./configure 30 | make 31 | make install 32 | 33 | The most important options for configure are: 34 | 35 | --prefix=path 36 | Set the installation prefix. The default is /usr/local. 37 | 38 | --with-x11[=path] 39 | Build the X11 based terminal. 40 | 41 | --with-sdl 42 | Build the SDL based terminal. 43 | 44 | 45 | have fun 46 | Hampa Hug 47 | -------------------------------------------------------------------------------- /src/devices/video/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/devices/video/Makefile.inc 2 | 3 | rel := src/devices/video 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | DEV_VID_BAS := \ 9 | cga \ 10 | ega \ 11 | hgc \ 12 | mda \ 13 | olivetti \ 14 | plantronics \ 15 | vga \ 16 | video \ 17 | wy700 18 | 19 | DEV_VID_SRC := $(foreach f,$(DEV_VID_BAS),$(rel)/$(f).c) 20 | DEV_VID_OBJ := $(foreach f,$(DEV_VID_BAS),$(rel)/$(f).o) 21 | DEV_VID_HDR := $(foreach f,$(DEV_VID_BAS),$(rel)/$(f).h) 22 | DEV_VID_ARC := $(rel)/video.a 23 | 24 | CLN += $(DEV_VID_ARC) $(DEV_VID_OBJ) 25 | DIST += $(DEV_VID_SRC) $(DEV_VID_HDR) 26 | DIST += $(rel)/cga_font.h $(rel)/hgc_font.h $(rel)/mda_font.h 27 | 28 | $(rel)/cga.o: $(rel)/cga.c 29 | $(rel)/ega.o: $(rel)/ega.c 30 | $(rel)/hgc.o: $(rel)/hgc.c 31 | $(rel)/mda.o: $(rel)/mda.c 32 | $(rel)/olivetti.o: $(rel)/olivetti.c 33 | $(rel)/plantronics.o: $(rel)/plantronics.c 34 | $(rel)/vga.o: $(rel)/vga.c 35 | $(rel)/video.o: $(rel)/video.c 36 | $(rel)/wy700.o: $(rel)/wy700.c 37 | 38 | $(rel)/video.a: $(DEV_VID_OBJ) 39 | -------------------------------------------------------------------------------- /dist/pce-macplus-gen.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | PCE.js Classic Mac OS in the Browser 7 | 8 | 9 | 10 |
11 | 12 | 13 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 |
25 |
Downloading...
26 |
27 | 31 |
32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/utils/pce-img/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/utils/pce-img/Makefile.inc 2 | 3 | rel := src/utils/pce-img 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | PCEIMG_BAS := commit convert cow create pce-img 9 | PCEIMG_SRC := $(foreach f,$(PCEIMG_BAS),$(rel)/$(f).c) 10 | PCEIMG_OBJ := $(foreach f,$(PCEIMG_BAS),$(rel)/$(f).o) 11 | PCEIMG_HDR := $(rel)/pce-img.h 12 | PCEIMG_MAN1 := $(rel)/pce-img.1 13 | PCEIMG_BIN := $(rel)/pce-img$(EXEEXT) 14 | 15 | PCEIMG_OBJ_EXT := \ 16 | src/lib/getopt.o \ 17 | src/lib/sysdep.o \ 18 | src/drivers/block/block.a \ 19 | src/drivers/psi/psi.a 20 | 21 | BIN += $(PCEIMG_BIN) 22 | MAN1 += $(PCEIMG_MAN1) 23 | CLN += $(PCEIMG_BIN) $(PCEIMG_OBJ) 24 | DIST += $(PCEIMG_SRC) $(PCEIMG_HDR) $(PCEIMG_MAN1) 25 | 26 | $(rel)/commit.o: $(rel)/commit.c 27 | $(rel)/convert.o: $(rel)/convert.c 28 | $(rel)/cow.o: $(rel)/cow.c 29 | $(rel)/create.o: $(rel)/create.c 30 | $(rel)/pce-img.o: $(rel)/pce-img.c 31 | 32 | $(rel)/pce-img$(EXEEXT): $(PCEIMG_OBJ_EXT) $(PCEIMG_OBJ) 33 | $(QP)echo " LD $@" 34 | $(QR)$(LD) $(LDFLAGS_DEFAULT) -o $@ $(PCEIMG_OBJ) $(PCEIMG_OBJ_EXT) 35 | -------------------------------------------------------------------------------- /doc/sound-drivers.txt: -------------------------------------------------------------------------------- 1 | Sound drivers 2 | ============= 3 | 4 | The syntax of a sound driver specification is: 5 | 6 | :=:=... 7 | 8 | White space around option names and values is ignored. If a value contains 9 | a colon, it must be escaped by repeating it. 10 | 11 | 12 | The following options can be used with all sound drivers: 13 | 14 | wav= 15 | Write the sound output to a WAV file. 16 | 17 | lowpass= 18 | Apply a low-pass filter. If is 0 (the default), 19 | the low-pass filter is disabled. 20 | 21 | wavfilter=[0|1] 22 | If true then the low-pass filter is applied before the sound 23 | is written to the WAV file. 24 | 25 | 26 | The following is a list of sound drivers and their options: 27 | 28 | null: 29 | The null sound driver that discards output written to it. It can 30 | still be written to a WAV file as a side effect. 31 | 32 | 33 | wav: 34 | This is another name for the null sound driver. 35 | 36 | 37 | oss: 38 | The OSS sound driver. 39 | 40 | dev= 41 | Set the OSS device. 42 | 43 | 44 | sdl: 45 | The SDL sound driver. 46 | -------------------------------------------------------------------------------- /src/arch/ibmpc/bios/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/arch/ibmpc/bios/Makefile.inc 2 | 3 | rel := src/arch/ibmpc/bios 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | NFLAGS := -Isrc/ -I$(srcdir)/src/arch/ibmpc/ -I$(srcdir)/src/arch/ibmpc/bios/ 9 | 10 | # ---------------------------------------------------------------------- 11 | 12 | PCE_IBMPC_PCEX_BAS := pcex 13 | PCE_IBMPC_PCEX_SRC := $(rel)/pcex.asm 14 | PCE_IBMPC_PCEX_ROM := $(rel)/pcex.rom 15 | PCE_IBMPC_PCEX_BIN := $(rel)/ibmpc-pcex.rom 16 | PCE_IBMPC_PCEX_SDP := src/arch/ibmpc/pce.inc 17 | PCE_IBMPC_PCEX_REL := $(rel) 18 | 19 | CLN += $(PCE_IBMPC_PCEX_BIN) $(PCE_IBMPC_PCEX_OBJ) 20 | DIST += $(PCE_IBMPC_PCEX_SRC) $(PCE_IBMPC_PCEX_ROM) 21 | 22 | ifeq "$(PCE_BUILD_IBMPC)" "1" 23 | TARGETS += $(PCE_IBMPC_PCEX_BIN) 24 | SHARE_IBMPC += $(PCE_IBMPC_PCEX_BIN) 25 | endif 26 | 27 | ifeq "$(PCE_BUILD_IBMPC_ROM)" "1" 28 | 29 | $(rel)/ibmpc-pcex.rom: $(rel)/pcex.asm $(PCE_IBMPC_PCEX_SDP) 30 | $(QP)echo " NASM $@" 31 | $(QR)$(NASM) $(NFLAGS) -DNOFILL -O6 -f bin -o $@ $< 32 | 33 | else 34 | 35 | $(rel)/ibmpc-pcex.rom: $(rel)/pcex.rom 36 | $(QP)echo " CAT $@" 37 | $(QR)cat $< > $@ 38 | 39 | endif 40 | -------------------------------------------------------------------------------- /gendep: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is used to regenerate Makefile.dep using a sequence 4 | # like this: 5 | # 6 | # $ ./configure 7 | # $ make CFLAGS=-MMD 8 | # $ gendep > Makefile.dep 9 | 10 | 11 | mk_dep_list () 12 | { 13 | local line 14 | local f 15 | 16 | while read line ; do 17 | line=${line/:/} 18 | 19 | for f in $line ; do 20 | echo "$f" 21 | done 22 | done 23 | } 24 | 25 | mk_dep_sort () 26 | { 27 | local tgt src 28 | 29 | read tgt 30 | read src 31 | 32 | echo "$tgt" 33 | echo "$src" 34 | 35 | sort -u 36 | } 37 | 38 | mk_dep_rule () 39 | { 40 | local tgt src 41 | 42 | read tgt 43 | read src 44 | 45 | printf "%s: %s" "$tgt" "$src" 46 | 47 | while read src ; do 48 | printf " \\\\\\n" 49 | printf "\\t%s" "$src" 50 | done 51 | 52 | printf "\\n" 53 | } 54 | 55 | mk_dep () 56 | { 57 | local src=$1 58 | 59 | cat "$src" |\ 60 | mk_dep_list |\ 61 | grep "^src/" |\ 62 | mk_dep_sort |\ 63 | mk_dep_rule 64 | } 65 | 66 | echo "# Makefile.dep" 67 | echo "#" 68 | echo "# This file was generated by gendep" 69 | 70 | find . -type f -name "*.d" |\ 71 | sort |\ 72 | while read src ; do 73 | echo 74 | mk_dep "$src" 75 | done 76 | -------------------------------------------------------------------------------- /commonjs/pcejs-macplus/example-umd/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 |
25 |
Downloading...
26 |
27 | 31 |
32 |
33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /dist/pce-macplus-mob.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | PCE.js Classic Mac OS in the Browser 7 | 8 | 9 | 10 | 11 |
12 |

PCE.js - a hack by James Friend

13 |
14 | PCE.js emulates classic computers in the browser. This is a cut-down version for 15 | mobile devices, running Mac OS System 1.1 and Finder 1.1g. Try it in landscape orientation! Also, if 16 | you're having trouble double clicking, trying slowing down your taps to about one per second. 17 |
18 |
19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/utils/psi/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/utils/psi/Makefile.inc 2 | 3 | rel := src/utils/psi 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | PSI_BAS := \ 9 | comment \ 10 | delete \ 11 | edit \ 12 | info \ 13 | list \ 14 | load \ 15 | merge \ 16 | new \ 17 | reorder \ 18 | save \ 19 | main 20 | 21 | PSI_SRC := $(foreach f,$(PSI_BAS),$(rel)/$(f).c) 22 | PSI_OBJ := $(foreach f,$(PSI_BAS),$(rel)/$(f).o) 23 | PSI_HDR := $(foreach f,$(PSI_BAS),$(rel)/$(f).h) 24 | PSI_MAN1 := $(rel)/psi.1 25 | PSI_BIN := $(rel)/psi$(EXEEXT) 26 | 27 | PSI_OBJ_EXT := \ 28 | src/drivers/psi/psi.a \ 29 | src/lib/getopt.o 30 | 31 | BIN += $(PSI_BIN) 32 | MAN1 += $(PSI_MAN1) 33 | CLN += $(PSI_BIN) $(PSI_OBJ) 34 | DIST += $(PSI_SRC) $(PSI_HDR) $(PSI_MAN1) 35 | 36 | $(rel)/comment.o: $(rel)/comment.c 37 | $(rel)/delete.o: $(rel)/delete.c 38 | $(rel)/edit.o: $(rel)/edit.c 39 | $(rel)/info.o: $(rel)/info.c 40 | $(rel)/list.o: $(rel)/list.c 41 | $(rel)/load.o: $(rel)/load.c 42 | $(rel)/main.o: $(rel)/main.c 43 | $(rel)/main.o: $(rel)/merge.c 44 | $(rel)/new.o: $(rel)/new.c 45 | $(rel)/save.o: $(rel)/save.c 46 | $(rel)/reorder.o: $(rel)/reorder.c 47 | 48 | $(rel)/psi$(EXEEXT): $(PSI_OBJ_EXT) $(PSI_OBJ) 49 | $(QP)echo " LD $@" 50 | $(QR)$(LD) $(LDFLAGS_DEFAULT) -o $@ $(PSI_OBJ) $(PSI_OBJ_EXT) 51 | -------------------------------------------------------------------------------- /dist/pce-macplus-big.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | PCE.js Classic Mac OS in the Browser 7 | 8 | 9 | 10 |
11 | PCE.js - a jsdf joint 12 |
13 | PCE.js is a browser port of Hampa Hug's excellent 14 | PCE emulator, using Emscripten. 15 | Runs best with asm.js support. 16 |
17 |
18 | 19 |
20 | 21 | 22 | 23 | 24 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /dist/pce-macplus-lite.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | PCE.js Classic Mac OS in the Browser 7 | 8 | 9 | 10 |
11 | PCE.js - a jsdf joint 12 |
13 | PCE.js is a browser port of Hampa Hug's excellent 14 | PCE emulator, using Emscripten. 15 | Runs best with asm.js support. 16 |
17 |
18 | 19 |
20 | 21 | 22 | 23 | 24 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /commonjs/prepublish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | PCEJS_DIR=$(git rev-parse --show-toplevel) 5 | 6 | arch=${1:-""} 7 | 8 | SKIP_PROMPTS=${SKIP_PROMPTS:-""} 9 | # SKIP_PROMPTS="y" 10 | 11 | if [[ -z "$SKIP_PROMPTS" ]]; then 12 | SKIP_PROMPTS=${2:-""} 13 | fi 14 | if [[ -n "$SKIP_PROMPTS" ]]; then 15 | echo "using defaults for all prompts" 16 | fi 17 | 18 | 19 | if [[ -z $arch ]] 20 | then 21 | echo "missing pcejs arch argument [macplus ibmpc atarist]" >&2 22 | exit 1 23 | fi 24 | 25 | echo "building pcejs-${arch} package" 26 | echo "do you want to update to the emulator js module output by the build system into the dist/ directory?" 27 | echo "otherwise any emulator js module currently in module dir will be used" 28 | 29 | 30 | UPDATE_BUILD="y" 31 | if [[ -n $SKIP_PROMPTS ]]; then 32 | echo "using default response: $UPDATE_BUILD" 33 | else 34 | read -n 1 -r -p "Y/n " 35 | echo 36 | if [[ $REPLY =~ ^[Nn]$ ]]; then 37 | UPDATE_BUILD="" 38 | fi 39 | fi 40 | 41 | if [[ -n $UPDATE_BUILD ]]; then 42 | ( 43 | cd "$PCEJS_DIR" 44 | ./pcejs_build module "$arch" 45 | ) 46 | else 47 | if [[ ! -e "$PCEJS_DIR/commonjs/pcejs-${arch}/lib/pcejs-${arch}.js" ]]; then 48 | echo "existing emulator js module not found" 49 | exit 1 50 | else 51 | echo "using existing emulator js module" 52 | fi 53 | fi 54 | -------------------------------------------------------------------------------- /src/drivers/sound/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/drivers/sound/Makefile.inc 2 | 3 | rel := src/drivers/sound 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | DRV_SND_BAS := filter sound sound-null sound-wav 9 | DRV_SND_NBAS := 10 | 11 | ifeq "$(PCE_ENABLE_SOUND_OSS)" "1" 12 | DRV_SND_BAS += sound-oss 13 | else 14 | DRV_SND_NBAS += sound-oss 15 | endif 16 | 17 | ifeq "$(PCE_ENABLE_SDL)" "1" 18 | DRV_SND_BAS += sound-sdl 19 | else 20 | DRV_SND_NBAS += sound-sdl 21 | endif 22 | 23 | DRV_SND_SRC := $(foreach f,$(DRV_SND_BAS),$(rel)/$(f).c) 24 | DRV_SND_NSRC := $(foreach f,$(DRV_SND_NBAS),$(rel)/$(f).c) 25 | DRV_SND_OBJ := $(foreach f,$(DRV_SND_BAS),$(rel)/$(f).o) 26 | DRV_SND_NOBJ := $(foreach f,$(DRV_SND_NBAS),$(rel)/$(f).o) 27 | DRV_SND_HDR := $(foreach f,$(DRV_SND_BAS),$(rel)/$(f).h) 28 | DRV_SND_NHDR := $(foreach f,$(DRV_SND_NBAS),$(rel)/$(f).h) 29 | DRV_SND_ARC := $(rel)/sound.a 30 | 31 | CLN += $(DRV_SND_OBJ) $(DRV_SND_NOBJ) $(DRV_SND_ARC) 32 | DIST += $(DRV_SND_SRC) $(DRV_SND_HDR) $(DRV_SND_NSRC) $(DRV_SND_NHDR) 33 | 34 | $(rel)/sound-sdl.o: $(rel)/sound-sdl.c 35 | $(QP)echo " CC $@" 36 | $(QR)$(CC) -c $(CFLAGS_DEFAULT) $(PCE_SDL_CFLAGS) -o $@ $< 37 | 38 | $(rel)/filter.o: $(rel)/filter.c 39 | $(rel)/sound.o: $(rel)/sound.c 40 | $(rel)/sound-null.o: $(rel)/sound-null.c 41 | $(rel)/sound-oss.o: $(rel)/sound-oss.c 42 | $(rel)/sound-wav.o: $(rel)/sound-wav.c 43 | 44 | $(rel)/sound.a: $(DRV_SND_OBJ) 45 | -------------------------------------------------------------------------------- /src/lib/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/lib/Makefile.inc 2 | 3 | rel := src/lib 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc $(rel)/stdint/stdint.h 7 | 8 | LIBPCE_BAS := \ 9 | brkpt \ 10 | cmd \ 11 | console \ 12 | getopt \ 13 | ihex \ 14 | iniata \ 15 | inidsk \ 16 | iniram \ 17 | initerm \ 18 | load \ 19 | log \ 20 | monitor \ 21 | msg \ 22 | path \ 23 | srec \ 24 | string \ 25 | sysdep 26 | 27 | ifeq "$(PCE_ENABLE_TUN)" "1" 28 | LIBPCE_BAS += tun 29 | else 30 | DIST += $(rel)/tun.c $(rel)/tun.h 31 | endif 32 | 33 | LIBPCE_SRC := $(foreach f,$(LIBPCE_BAS),$(rel)/$(f).c) 34 | LIBPCE_OBJ := $(foreach f,$(LIBPCE_BAS),$(rel)/$(f).o) 35 | LIBPCE_HDR := $(foreach f,$(LIBPCE_BAS),$(rel)/$(f).h) 36 | LIBPCE_SDP := src/config.h 37 | 38 | CLN += $(LIBPCE_OBJ) 39 | DIST += $(LIBPCE_SRC) $(LIBPCE_HDR) 40 | 41 | $(rel)/brkpt.o: $(rel)/brkpt.c 42 | $(rel)/cmd.o: $(rel)/cmd.c 43 | $(rel)/console.o: $(rel)/console.c 44 | $(rel)/getopt.o: $(rel)/getopt.c 45 | $(rel)/ihex.o: $(rel)/ihex.c 46 | $(rel)/iniata.o: $(rel)/iniata.c 47 | $(rel)/inidsk.o: $(rel)/inidsk.c 48 | $(rel)/iniram.o: $(rel)/iniram.c 49 | $(rel)/initerm.o: $(rel)/initerm.c 50 | $(rel)/log.o: $(rel)/log.c 51 | $(rel)/monitor.o: $(rel)/monitor.c 52 | $(rel)/msg.o: $(rel)/msg.c 53 | $(rel)/path.o: $(rel)/path.c 54 | $(rel)/tun.o: $(rel)/tun.c 55 | $(rel)/srec.o: $(rel)/srec.c 56 | $(rel)/string.o: $(rel)/string.c 57 | $(rel)/sysdep.o: $(rel)/sysdep.c 58 | -------------------------------------------------------------------------------- /commonjs/prelude.js: -------------------------------------------------------------------------------- 1 | var Module = opts || {}; 2 | 3 | // hide node/commonjs globals so emscripten doesn't get confused 4 | var process = void 0; 5 | var require = void 0; 6 | 7 | var pathGetFilenameRegex = /\/([^\/]+)$/; 8 | 9 | function pathGetFilename(path) { 10 | var matches = path.match(pathGetFilenameRegex); 11 | if (matches && matches.length) { 12 | return matches[1]; 13 | } else { 14 | return path; 15 | } 16 | } 17 | 18 | function addAutoloader(module) { 19 | var loadDatafiles = function() { 20 | module.autoloadFiles.forEach(function(filepath) { 21 | module.FS_createPreloadedFile( 22 | '/', 23 | pathGetFilename(filepath), 24 | filepath, 25 | true, 26 | true 27 | ); 28 | }); 29 | }; 30 | 31 | if (module.autoloadFiles) { 32 | module.preRun = module.preRun || []; 33 | module.preRun.unshift(loadDatafiles); 34 | } 35 | 36 | return module; 37 | } 38 | 39 | function addCustomAsyncInit(module) { 40 | if (module.asyncInit) { 41 | module.preRun = module.preRun || []; 42 | module.preRun.push(function waitForCustomAsyncInit() { 43 | module.addRunDependency('pcejsAsyncInit'); 44 | 45 | module.asyncInit(module, function asyncInitCallback() { 46 | module.removeRunDependency('pcejsAsyncInit'); 47 | }); 48 | }); 49 | } 50 | } 51 | 52 | // inject extra behaviours 53 | addAutoloader(Module); 54 | addCustomAsyncInit(Module); 55 | -------------------------------------------------------------------------------- /src/arch/sims32/pce-sims32.cfg.in: -------------------------------------------------------------------------------- 1 | # pce-sims32.cfg 2 | # 3 | # Example config file 4 | 5 | section sims32 { 6 | section sparc32 { 7 | model = "sparc32" 8 | nwindows = 4 9 | } 10 | 11 | # Multiple "ram" sections may be present 12 | section ram { 13 | # The linear base address 14 | address = 0x00000000 15 | 16 | # The size in bytes 17 | size = 0x04000000 18 | 19 | # The RAM image that is used to initialize the RAM 20 | file = "linux.bin" 21 | } 22 | 23 | # Multiple "rom" sections may be present 24 | section rom { 25 | # The file from which the rom code is loaded 26 | file = "sims32.rom" 27 | 28 | # The linear base address 29 | address = 0xffff0000 30 | 31 | # The rom size in bytes 32 | size = 65536 33 | } 34 | 35 | # load sections are processed after the emulator is set up. 36 | section load { 37 | format = "ihex" 38 | file = "sims32.ihex" 39 | } 40 | 41 | section load { 42 | format = "binary" 43 | file = "rom.bin" 44 | address = 0xffff0000 45 | } 46 | 47 | # Up to two "serial" sections may be present. The first is 48 | # UART0, the second UART1. If the base addresses are changed, 49 | # linux won't find the UARTs 50 | section serial { 51 | address = 0xef600300 52 | irq = 0 53 | 54 | # The file that output is written to 55 | file = "current/uart0.out" 56 | } 57 | 58 | section serial { 59 | address = 0xef600400 60 | irq = 1 61 | file = "current/uart1.out" 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/drivers/video/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/drivers/video/Makefile.inc 2 | 3 | rel := src/drivers/video 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | DRV_TRM_BAS := font keys null terminal 9 | DRV_TRM_NBAS := 10 | 11 | ifeq "$(PCE_ENABLE_X11)" "1" 12 | DRV_TRM_BAS += x11 13 | else 14 | DRV_TRM_NBAS += x11 15 | endif 16 | 17 | ifeq "$(PCE_ENABLE_SDL)" "1" 18 | DRV_TRM_BAS += sdl 19 | else 20 | DRV_TRM_NBAS += sdl 21 | endif 22 | 23 | DRV_TRM_SRC := $(foreach f,$(DRV_TRM_BAS),$(rel)/$(f).c) 24 | DRV_TRM_NSRC := $(foreach f,$(DRV_TRM_NBAS),$(rel)/$(f).c) 25 | DRV_TRM_OBJ := $(foreach f,$(DRV_TRM_BAS),$(rel)/$(f).o) 26 | DRV_TRM_NOBJ := $(foreach f,$(DRV_TRM_NBAS),$(rel)/$(f).o) 27 | DRV_TRM_HDR := $(foreach f,$(DRV_TRM_BAS),$(rel)/$(f).h) 28 | DRV_TRM_NHDR := $(foreach f,$(DRV_TRM_NBAS),$(rel)/$(f).h) 29 | DRV_TRM_ARC := $(rel)/terminal.a 30 | 31 | CLN += $(DRV_TRM_ARC) $(DRV_TRM_OBJ) $(DRV_TRM_NOBJ) 32 | DIST += $(DRV_TRM_SRC) $(DRV_TRM_HDR) $(DRV_TRM_NSRC) $(DRV_TRM_NHDR) 33 | 34 | $(rel)/x11.o: $(rel)/x11.c 35 | $(QP)echo " CC $@" 36 | $(QR)$(CC) -c $(CFLAGS_DEFAULT) $(PCE_X11_CFLAGS) -o $@ $< 37 | 38 | $(rel)/sdl.o: $(rel)/sdl.c 39 | $(QP)echo " CC $@" 40 | $(QR)$(CC) -c $(CFLAGS_DEFAULT) $(PCE_SDL_CFLAGS) -o $@ $< 41 | 42 | $(rel)/font.o: $(rel)/font.c 43 | $(rel)/keys.o: $(rel)/keys.c 44 | $(rel)/null.o: $(rel)/null.c 45 | $(rel)/term-old.o: $(rel)/term-old.c 46 | $(rel)/terminal.o: $(rel)/terminal.c 47 | 48 | $(rel)/terminal.a: $(DRV_TRM_OBJ) 49 | -------------------------------------------------------------------------------- /doc/pce-macplus.txt: -------------------------------------------------------------------------------- 1 | PCE/macplus - Macintosh Plus Emulator 2 | ============================================================================== 3 | 4 | PCE/macplus is a Macintosh Plus emulator. It emulates a Macintosh 128K, 5 | Macintosh 512k, Macintosh 512ke or a Macintosh Plus on Unix-like and Windows 6 | host operating systems. 7 | 8 | Emulated parts: 9 | 10 | Part Status 11 | 12 | CPU A complete MC68000 emulator. 13 | 14 | ROM An unmodified ROM image from a Macintosh Plus is needed. 15 | 16 | RAM Memory configurations of 128K, 512K, 1M, 2.5M and 4M are 17 | supported. 18 | 19 | Video Supported (512*342*2) 20 | 21 | Sound Not yet supported 22 | 23 | Floppy disks Supported by a custom driver. For this to work the ROM is 24 | patched at runtime. 25 | 26 | SCSI Up to 7 harddisks are supported 27 | 28 | Serial ports Supported 29 | 30 | Mouse Supported 31 | 32 | Keyboard Supported 33 | 34 | 35 | Configuration 36 | ============================================================================== 37 | 38 | PCE/macplus is configured by means of a config file. A documented example 39 | config file is installed in $(prefix)/etc/pce-macplus.cfg. 40 | 41 | 42 | Running PCE/macplus 43 | ============================================================================== 44 | 45 | After starting the emulator, pce/macplus is in command mode (unless the -r 46 | option was used). Type 'h' to get a short summary of the available 47 | commands. 48 | 49 | The 'g' command starts the simulation. It can be interrupted by 50 | pressing Ctrl-`. 51 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | roms 3 | roms*/ 4 | build/ 5 | build-native/ 6 | pce-js/ 7 | /systems 8 | dist/ 9 | 10 | # old build system 11 | pcejs-build-config.json 12 | 13 | # new build system 14 | pcejs_build_conf.sh 15 | 16 | # files generated by configure and make 17 | src/**/*.o 18 | src/**/*.a 19 | src/arch/**/*.cfg 20 | src/arch/**/*.com 21 | src/arch/**/*.sys 22 | src/arch/**/*.rom 23 | config.log 24 | config.status 25 | Makefile 26 | Makefile.inc 27 | src/arch/atarist/pce-atarist 28 | src/arch/ibmpc/pce-ibmpc 29 | src/arch/macplus/pce-macplus 30 | src/config.h 31 | src/config.inc 32 | src/utils/pce-img/pce-img 33 | src/utils/pri/pri 34 | src/utils/psi/psi 35 | 36 | # examples system files 37 | example/**/*.rom 38 | example/**/*.qed 39 | example/**/*.img 40 | example/**/*.st 41 | example/**/*.psi 42 | example/**/*.cfg 43 | 44 | # example generated files 45 | example/*/*.umd.js 46 | example/*/bundle.js 47 | example/*/pce-*.js 48 | example/*/pce-*.js.mem 49 | example/*/pce-*.worker.js 50 | example/*/pthread-main.js 51 | example/*/pthread-prelude.js 52 | example/*/worker-prelude.js 53 | 54 | # commonjs generated files 55 | commonjs/pcejs-*/*.umd.js 56 | commonjs/pcejs-*/lib/pce-*.js.mem 57 | commonjs/pcejs-*/pce-*.js.mem 58 | commonjs/pcejs-*/pce-*.worker.js 59 | commonjs/pcejs-*/pthread-main.js 60 | 61 | # files generated by emscripten 62 | a.out 63 | a.out.js 64 | a.out.js.mem 65 | *.wasm 66 | *.wasm.map 67 | 68 | # files generated by running the emulator natively in this dir 69 | mac-plus-pram.dat 70 | pram.dat 71 | ser_a 72 | ser_b 73 | ser_a.out 74 | ser_b.out 75 | 76 | # misc 77 | *.sublime-workspace -------------------------------------------------------------------------------- /src/arch/sims32/sercons.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/sims32/sercons.h * 7 | * Created: 2004-09-28 by Hampa Hug * 8 | * Copyright: (C) 2004-2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_SIMS32_SERCONS_H 24 | #define PCE_SIMS32_SERCONS_H 1 25 | 26 | 27 | void scon_check (sims32_t *sim); 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/drivers/video/font.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/video/font.h * 7 | * Created: 2003-09-15 by Hampa Hug * 8 | * Copyright: (C) 2003-2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_TERMINAL_FONT_H 24 | #define PCE_TERMINAL_FONT_H 1 25 | 26 | 27 | extern unsigned char fnt_8x16[256 * 16]; 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/arch/macplus/traps.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/macplus/traps.h * 7 | * Created: 2007-11-22 by Hampa Hug * 8 | * Copyright: (C) 2007-2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_MACPLUS_TRAPS_H 24 | #define PCE_MACPLUS_TRAPS_H 1 25 | 26 | 27 | const char *mac_get_trap_name (unsigned trap); 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/arch/atarist/msg.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/atarist/msg.h * 7 | * Created: 2011-03-17 by Hampa Hug * 8 | * Copyright: (C) 2011-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_ATARIST_MSG_H 24 | #define PCE_ATARIST_MSG_H 1 25 | 26 | 27 | int st_set_msg (atari_st_t *sim, const char *msg, const char *val); 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/utils/psi/info.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/psi/info.h * 7 | * Created: 2013-06-09 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_INFO_H 24 | #define PSI_INFO_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | int psi_print_info (psi_img_t *img); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-tc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-tc.h * 7 | * Created: 2011-08-18 by Hampa Hug * 8 | * Copyright: (C) 2011-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_TC_H 24 | #define PSI_IMG_TC_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | psi_img_t *psi_load_tc (FILE *fp); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/utils/psi/delete.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/psi/delete.h * 7 | * Created: 2013-06-09 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_DELETE_H 24 | #define PSI_DELETE_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | int psi_delete_sectors (psi_img_t *img); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/arch/ibmpc/msg.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/ibmpc/msg.h * 7 | * Created: 2004-09-25 by Hampa Hug * 8 | * Copyright: (C) 2004-2010 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_MSG_H 24 | #define PCE_MSG_H 1 25 | 26 | 27 | #include "ibmpc.h" 28 | 29 | 30 | int pc_set_msg (ibmpc_t *pc, const char *msg, const char *val); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/utils/psi/merge.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/psi/merge.h * 7 | * Created: 2013-06-09 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_MERGE_H 24 | #define PSI_MERGE_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | int psi_merge_image (psi_img_t *img, const char *fname); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/arch/rc759/msg.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/rc759/msg.h * 7 | * Created: 2012-06-29 by Hampa Hug * 8 | * Copyright: (C) 2012 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_RC759_MSG_H 24 | #define PCE_RC759_MSG_H 1 25 | 26 | 27 | #include "rc759.h" 28 | 29 | 30 | int rc759_set_msg (rc759_t *sim, const char *msg, const char *val); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /doc/pce-atarist.txt: -------------------------------------------------------------------------------- 1 | PCE/atarist - Atari ST Emulator 2 | ============================================================================== 3 | 4 | PCE/atarist is an Atari ST emulator. It emulates the various ST and Mega ST 5 | models on Unix-like and Windows host operating systems. 6 | 7 | Emulated parts: 8 | 9 | Part Status 10 | ------------------------------------------------------------------------------ 11 | 12 | CPU A complete MC68000 emulator. 13 | 14 | ROM An unmodified ROM image from an Atari ST is needed. Supported 15 | TOS versions are 1.00, 1.02, 1.04 and 2.06. 16 | 17 | RAM Up to 14 MiB of memory are supported. 18 | 19 | Video All 3 standard Atari ST video modes are supported. Special 20 | border effects, used by some demos and games, are not yet 21 | supported. 22 | 23 | Sound Not yet supported 24 | 25 | FDC Supported 26 | 27 | ACSI Up to 7 harddisks are supported. 28 | 29 | Serial port Supported 30 | 31 | Parallel port Supported 32 | 33 | Mouse Supported 34 | 35 | Keyboard Supported 36 | 37 | MIDI Output can be written to a standard MIDI file. 38 | 39 | 40 | Configuration 41 | ============================================================================== 42 | 43 | PCE/atarist is configured by means of a config file. A documented example 44 | config file is installed in $(prefix)/etc/pce-atarist.cfg. 45 | 46 | 47 | Running PCE/atarist 48 | ============================================================================== 49 | 50 | After starting the emulator, pce/atarist is in command mode (unless the -r 51 | option was used). Type 'h' to get a short summary of the available 52 | commands. 53 | 54 | The 'g' command starts the simulation. It can be interrupted by 55 | pressing Ctrl-`. 56 | -------------------------------------------------------------------------------- /src/arch/macplus/msg.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/macplus/msg.h * 7 | * Created: 2007-12-04 by Hampa Hug * 8 | * Copyright: (C) 2007-2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_MACPLUS_MSG_H 24 | #define PCE_MACPLUS_MSG_H 1 25 | 26 | 27 | #include "macplus.h" 28 | 29 | 30 | int mac_set_msg (macplus_t *sim, const char *msg, const char *val); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/utils/psi/edit.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/psi/edit.h * 7 | * Created: 2013-06-09 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_EDIT_H 24 | #define PSI_EDIT_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | int psi_edit_sectors (psi_img_t *img, const char *what, const char *val); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/arch/macplus/pcex/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/arch/macplus/pcex/Makefile.inc 2 | 3 | rel := src/arch/macplus/pcex 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | # ---------------------------------------------------------------------- 9 | 10 | MACX_CROSS := m68k-linux- 11 | 12 | MACX_CC := $(MACX_CROSS)gcc 13 | MACX_LD := $(MACX_CROSS)ld 14 | MACX_OC := $(MACX_CROSS)objcopy 15 | 16 | MACX_CFLAGS = -m68000 17 | 18 | MACX_ADDR := 0xf80000 19 | 20 | # ---------------------------------------------------------------------- 21 | 22 | PCE_MACPLUS_PCEX_SRC := $(rel)/pcex.S 23 | PCE_MACPLUS_PCEX_OBJ := $(rel)/pcex.o 24 | PCE_MACPLUS_PCEX_ELF := $(rel)/pcex.elf 25 | PCE_MACPLUS_PCEX_ROM := $(rel)/pcex.rom 26 | PCE_MACPLUS_PCEX_BIN := $(rel)/macplus-pcex.rom 27 | PCE_MACPLUS_PCEX_CLN := pcex.o pcex.elf macplus-pcex.rom 28 | 29 | CLN += $(foreach f,$(PCE_MACPLUS_PCEX_CLN),$(rel)/$(f)) 30 | DIST += $(PCE_MACPLUS_PCEX_SRC) $(PCE_MACPLUS_PCEX_ROM) 31 | 32 | ifeq "$(PCE_BUILD_MACPLUS)" "1" 33 | TARGETS += $(PCE_MACPLUS_PCEX_BIN) 34 | SHARE_MACPLUS += $(PCE_MACPLUS_PCEX_BIN) 35 | endif 36 | 37 | 38 | ifeq "$(PCE_BUILD_MACPLUS_ROM)" "1" 39 | $(rel)/macplus-pcex.rom: $(rel)/pcex.S 40 | $(QP)echo " CC68 $(PCE_MACPLUS_PCEX_OBJ)" 41 | $(QR)$(MACX_CC) $(MACX_CFLAGS) -c -o $(PCE_MACPLUS_PCEX_OBJ) $< 42 | 43 | $(QP)echo " LD68 $(PCE_MACPLUS_PCEX_ELF)" 44 | $(QR)$(MACX_LD) --entry=0 -Ttext $(MACX_ADDR) -o $(PCE_MACPLUS_PCEX_ELF) $(PCE_MACPLUS_PCEX_OBJ) 45 | 46 | $(QP)echo " OC68 $(PCE_MACPLUS_PCEX_ROM)" 47 | $(QR)$(MACX_OC) --output-target binary $(PCE_MACPLUS_PCEX_ELF) $@ 48 | $(QR)chmod 644 $@ 49 | else 50 | $(rel)/macplus-pcex.rom: $(rel)/pcex.rom 51 | $(QP)echo " CAT $@" 52 | $(QR)cat $< > $@ 53 | endif 54 | -------------------------------------------------------------------------------- /src/arch/ibmpc/pceutils/pceexit.asm: -------------------------------------------------------------------------------- 1 | ;***************************************************************************** 2 | ;* pce * 3 | ;***************************************************************************** 4 | 5 | ;***************************************************************************** 6 | ;* File name: pceexit.asm * 7 | ;* Created: 2003-04-25 by Hampa Hug * 8 | ;* Copyright: (C) 2003-2009 Hampa Hug * 9 | ;***************************************************************************** 10 | 11 | ;***************************************************************************** 12 | ;* This program is free software. You can redistribute it and / or modify it * 13 | ;* under the terms of the GNU General Public License version 2 as published * 14 | ;* by the Free Software Foundation. * 15 | ;* * 16 | ;* This program is distributed in the hope that it will be useful, but * 17 | ;* WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | ;* Public License for more details. * 20 | ;***************************************************************************** 21 | 22 | 23 | ; pceexit 24 | ; Terminate the emulator 25 | 26 | 27 | %include "pce.inc" 28 | 29 | 30 | section text 31 | 32 | org 0x100 33 | 34 | start: 35 | pceh PCEH_ABORT 36 | 37 | mov ax, 0x4c00 38 | int 0x21 39 | -------------------------------------------------------------------------------- /src/arch/ibmpc/pceutils/pcestop.asm: -------------------------------------------------------------------------------- 1 | ;***************************************************************************** 2 | ;* pce * 3 | ;***************************************************************************** 4 | 5 | ;***************************************************************************** 6 | ;* File name: pcestop.asm * 7 | ;* Created: 2003-04-25 by Hampa Hug * 8 | ;* Copyright: (C) 2003-2009 Hampa Hug * 9 | ;***************************************************************************** 10 | 11 | ;***************************************************************************** 12 | ;* This program is free software. You can redistribute it and / or modify it * 13 | ;* under the terms of the GNU General Public License version 2 as published * 14 | ;* by the Free Software Foundation. * 15 | ;* * 16 | ;* This program is distributed in the hope that it will be useful, but * 17 | ;* WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | ;* Public License for more details. * 20 | ;***************************************************************************** 21 | 22 | 23 | ; pcestop 24 | ; Fall back to the monitor 25 | 26 | 27 | %include "pce.inc" 28 | 29 | 30 | section text 31 | 32 | org 0x100 33 | 34 | start: 35 | pceh PCEH_STOP 36 | 37 | mov ax, 0x4c00 38 | int 0x21 39 | -------------------------------------------------------------------------------- /src/utils/psi/list.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/psi/list.h * 7 | * Created: 2013-06-09 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_LIST_H 24 | #define PSI_LIST_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | int psi_list_sectors (psi_img_t *img); 31 | int psi_list_tracks (psi_img_t *img); 32 | 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libjs/library_sdl.js: -------------------------------------------------------------------------------- 1 | // additions and overrides to emscripten's builtin SDL library 2 | 3 | LibrarySDL = { 4 | SDL_EventState: function() {}, 5 | }; 6 | 7 | var PCEJS_SDL_CreateRGBSurfaceFrom = true; // enable PCEJS custom implementation of SDL_CreateRGBSurfaceFrom 8 | if (PCEJS_SDL_CreateRGBSurfaceFrom) { 9 | LibrarySDL.SDL_CreateRGBSurfaceFrom = function(pixels, width, height, depth, pitch, rmask, gmask, bmask, amask) { 10 | // TODO: Take into account depth and pitch parameters. 11 | 12 | var surface = SDL.makeSurface(width, height, 0, false, 'CreateRGBSurfaceFrom', rmask, gmask, bmask, amask); 13 | 14 | var surfaceData = SDL.surfaces[surface]; 15 | var surfaceImageData = surfaceData.ctx.getImageData(0, 0, width, height); 16 | var surfacePixelData = surfaceImageData.data; 17 | 18 | // Fill pixel data to created surface. 19 | // Supports SDL_PIXELFORMAT_RGBA8888 and SDL_PIXELFORMAT_RGB888 20 | var channels = amask ? 4 : 3; // RGBA8888 or RGB888 21 | for (var pixelOffset = 0; pixelOffset < width*height; pixelOffset++) { 22 | surfacePixelData[pixelOffset*4] = {{{ makeGetValue('pixels', 'pixelOffset*channels', 'i8', null, true) }}}; // R 23 | surfacePixelData[pixelOffset*4+1] = {{{ makeGetValue('pixels', 'pixelOffset*channels+1', 'i8', null, true) }}}; // G 24 | surfacePixelData[pixelOffset*4+2] = {{{ makeGetValue('pixels', 'pixelOffset*channels+2', 'i8', null, true) }}}; // B 25 | surfacePixelData[pixelOffset*4+3] = amask ? {{{ makeGetValue('pixels', 'pixelOffset*channels+3', 'i8', null, true) }}} : 0xff; // A 26 | }; 27 | 28 | surfaceData.ctx.putImageData(surfaceImageData, 0, 0); 29 | 30 | return surface; 31 | } 32 | }; 33 | 34 | mergeInto(LibraryManager.library, LibrarySDL); -------------------------------------------------------------------------------- /src/arch/macplus/iwm-io.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/macplus/iwm-io.h * 7 | * Created: 2012-01-16 by Hampa Hug * 8 | * Copyright: (C) 2012 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_MACPLUS_IWM_IO_H 24 | #define PCE_MACPLUS_IWM_IO_H 1 25 | 26 | 27 | #include "iwm.h" 28 | 29 | 30 | int iwm_drv_load (mac_iwm_drive_t *drv); 31 | 32 | int iwm_drv_save (mac_iwm_drive_t *drv); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/utils/psi/new.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/psi/new.h * 7 | * Created: 2013-06-09 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_NEW_H 24 | #define PSI_NEW_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | int psi_new (psi_img_t **img); 31 | 32 | psi_img_t *psi_new_image (const char *type, const char *size); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/drivers/char/char-null.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/char/char-null.h * 7 | * Created: 2009-03-10 by Hampa Hug * 8 | * Copyright: (C) 2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_DRIVERS_CHAR_NULL_H 24 | #define PCE_DRIVERS_CHAR_NULL_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | typedef struct char_null_t { 31 | char_drv_t cdrv; 32 | } char_null_t; 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/arch/macplus/hook.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/macplus/hook.h * 7 | * Created: 2007-12-04 by Hampa Hug * 8 | * Copyright: (C) 2007-2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_MACPLUS_HOOK_H 24 | #define PCE_MACPLUS_HOOK_H 1 25 | 26 | 27 | #include "macplus.h" 28 | 29 | 30 | void mac_hook_skip (macplus_t *sim, unsigned cnt); 31 | 32 | int mac_hook (void *ext, unsigned val); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/arch/macplus/hotkey.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/macplus/hotkey.h * 7 | * Created: 2010-11-05 by Hampa Hug * 8 | * Copyright: (C) 2010-2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_MACPLUS_HOTKEY_H 24 | #define PCE_MACPLUS_HOTKEY_H 1 25 | 26 | 27 | #include "macplus.h" 28 | 29 | #include 30 | 31 | 32 | int mac_set_hotkey (macplus_t *sim, pce_key_t key); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-cp2.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-cp2.h * 7 | * Created: 2010-10-26 by Hampa Hug * 8 | * Copyright: (C) 2010-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_CP2_H 24 | #define PSI_IMG_CP2_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | psi_img_t *psi_load_cp2 (FILE *fp); 31 | 32 | int psi_save_cp2 (FILE *fp, const psi_img_t *img); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-xdf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-xdf.h * 7 | * Created: 2012-06-24 by Hampa Hug * 8 | * Copyright: (C) 2012-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_XDF_H 24 | #define PSI_IMG_XDF_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | psi_img_t *psi_load_xdf (FILE *fp); 31 | 32 | int psi_save_xdf (FILE *fp, const psi_img_t *img); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /doc/pbit-format.txt: -------------------------------------------------------------------------------- 1 | PBIT File Format (Version 0) 2 | ============================ 3 | 4 | All integers are in big-endian format. 5 | 6 | 7 | File structure 8 | -------------- 9 | 10 | 11 | 12 | [] 13 | 14 | For each track: 15 | 16 | [other chunks] 17 | [] 18 | 19 | 20 | 21 | 22 | File header chunk 23 | ----------------- 24 | 25 | 0 4 Magic ('PBIT') 26 | 4 4 Size (8) 27 | 8 4 Version (0) 28 | 12 4 File flags 29 | 16 4 CRC 30 | 31 | 32 | Comment chunk 33 | ------------- 34 | 35 | 0 4 Magic ('TEXT') 36 | 4 4 Size (n) 37 | 8 n Data 38 | 8+n 4 CRC 39 | 40 | 41 | Track header chunk 42 | ------------------ 43 | 44 | 0 4 Magic ('TRAK') 45 | 4 4 Size (20) 46 | 8 4 Cylinder 47 | 12 4 Head 48 | 16 4 Track length in bits 49 | 20 4 Bit clock rate 50 | 24 4 Track flags 51 | 28 4 CRC 52 | 53 | 54 | Track data chunk 55 | ---------------- 56 | 57 | 0 4 Magic ('DATA') 58 | 4 4 Size (n) 59 | 8 n Track data 60 | n+8 4 CRC 61 | 62 | 63 | End chunk 64 | --------- 65 | 66 | 0 4 Magic ('END ') 67 | 4 4 Size (0) 68 | 8 4 CRC (0x3d64af78) 69 | 70 | 71 | CRC 72 | --- 73 | 74 | - The algorithm used is big-endian CRC-32C with generator 75 | polynomial 0x1edc6f41. The CRC value is initialized to 0. 76 | 77 | unsigned long pbit_crc (const unsigned char *src, unsigned cnt) 78 | { 79 | unsigned i, j; 80 | unsigned long crc; 81 | 82 | crc = 0; 83 | 84 | for (i = 0; i < cnt; i++) { 85 | crc ^= (unsigned long) (src[i] & 0xff) << 24; 86 | 87 | for (j = 0; j < 8; j++) { 88 | if (crc & 0x80000000) { 89 | crc = (crc << 1) ^ 0x1edc6f41; 90 | } 91 | else { 92 | crc = crc << 1; 93 | } 94 | } 95 | } 96 | 97 | return (crc & 0xffffffff); 98 | } 99 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-ana.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-ana.h * 7 | * Created: 2010-08-13 by Hampa Hug * 8 | * Copyright: (C) 2010-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_ANA_H 24 | #define PSI_IMG_ANA_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | psi_img_t *psi_load_anadisk (FILE *fp); 31 | 32 | int psi_save_anadisk (FILE *fp, const psi_img_t *img); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/drivers/sound/sound-null.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/sound/sound-null.h * 7 | * Created: 2009-10-17 by Hampa Hug * 8 | * Copyright: (C) 2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_DRIVERS_SOUND_NULL_H 24 | #define PCE_DRIVERS_SOUND_NULL_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | typedef struct sound_null_t { 31 | sound_drv_t sdrv; 32 | } sound_null_t; 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/lib/initerm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/lib/initerm.h * 7 | * Created: 2008-10-21 by Hampa Hug * 8 | * Copyright: (C) 2008-2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_LIB_INITERM_H 24 | #define PCE_LIB_INITERM_H 1 25 | 26 | 27 | #include 28 | 29 | #include 30 | 31 | 32 | terminal_t *ini_get_terminal (ini_sct_t *ini, const char *def); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/utils/psi/load.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/psi/load.h * 7 | * Created: 2013-06-09 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_LOAD_H 24 | #define PSI_LOAD_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | int psi_load_sectors (psi_img_t *img, const char *fname); 31 | int psi_load_tags (psi_img_t *img, const char *fname); 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/utils/psi/save.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/psi/save.h * 7 | * Created: 2013-06-09 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_SAVE_H 24 | #define PSI_SAVE_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | int psi_save_sectors (psi_img_t *img, const char *fname); 31 | int psi_save_tags (psi_img_t *img, const char *fname); 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/arch/rc759/main.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/rc759/main.h * 7 | * Created: 2012-06-29 by Hampa Hug * 8 | * Copyright: (C) 2012 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_RC759_MAIN_H 24 | #define PCE_RC759_MAIN_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | extern const char *par_terminal; 31 | extern const char *par_video; 32 | 33 | 34 | void sim_log_deb (const char *msg, ...); 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/config.inc.in: -------------------------------------------------------------------------------- 1 | ;***************************************************************************** 2 | ;* pce * 3 | ;***************************************************************************** 4 | 5 | ;***************************************************************************** 6 | ;* File name: src/config.inc.in * 7 | ;* Created: 2003-09-03 by Hampa Hug * 8 | ;* Copyright: (C) 2003-2009 Hampa Hug * 9 | ;***************************************************************************** 10 | 11 | ;***************************************************************************** 12 | ;* This program is free software. You can redistribute it and / or modify it * 13 | ;* under the terms of the GNU General Public License version 2 as published * 14 | ;* by the Free Software Foundation. * 15 | ;* * 16 | ;* This program is distributed in the hope that it will be useful, but * 17 | ;* WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | ;* Public License for more details. * 20 | ;***************************************************************************** 21 | 22 | 23 | %ifndef PCE_CONFIG_INC 24 | %define PCE_CONFIG_INC 1 25 | 26 | 27 | %define PCE_VERSION_MAJ @PCE_VERSION_MAJ@ 28 | %define PCE_VERSION_MIN @PCE_VERSION_MIN@ 29 | %define PCE_VERSION_MIC @PCE_VERSION_MIC@ 30 | %define PCE_VERSION_STR "@PCE_VERSION_STR@" 31 | 32 | 33 | %endif 34 | -------------------------------------------------------------------------------- /src/arch/ibmpc/int13.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/ibmpc/int13.h * 7 | * Created: 2003-04-14 by Hampa Hug * 8 | * Copyright: (C) 2003-2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_INT13_H 24 | #define PCE_INT13_H 1 25 | 26 | 27 | #include "ibmpc.h" 28 | 29 | #include 30 | #include 31 | 32 | 33 | void dsk_int_13_check (ibmpc_t *pc); 34 | 35 | void dsk_int13 (disks_t *dsks, e8086_t *cpu); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /dist/pce-macplus-ext.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | PCE.js Classic Mac OS in the Browser 7 | 8 | 9 | 10 | 11 |
12 | PCE.js - a jsdf joint 13 |
14 | PCE.js is a browser port of Hampa Hug's excellent 15 | PCE emulator, using Emscripten. 16 | Runs best with asm.js support. 17 |
18 |
19 | 20 |
21 | 22 | 23 | 24 | 25 | 36 | 37 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/lib/stdint/stdint.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/lib/stdint/stdint.h * 7 | * Created: 2005-07-11 by Hampa Hug * 8 | * Copyright: (C) 2005-2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_LIB_STDINT_H 24 | #define PCE_LIB_STDINT_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | #ifdef HAVE_INTTYPES_H 31 | #include 32 | #else 33 | typedef unsigned char uint8_t; 34 | typedef unsigned short uint16_t; 35 | typedef unsigned long uint32_t; 36 | #endif 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/drivers/char/char-tios.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/char/char-tios.h * 7 | * Created: 2009-03-06 by Hampa Hug * 8 | * Copyright: (C) 2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_DRIVERS_CHAR_TIOS_H 24 | #define PCE_DRIVERS_CHAR_TIOS_H 1 25 | 26 | 27 | #include 28 | 29 | #include 30 | 31 | 32 | typedef struct char_tios_t { 33 | char_drv_t cdrv; 34 | 35 | char *fname; 36 | 37 | int fd; 38 | } char_tios_t; 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/arch/ibmpc/pceutils/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/arch/ibmpc/pceutils/Makefile.inc 2 | 3 | rel := src/arch/ibmpc/pceutils 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | # ---------------------------------------------------------------------- 9 | 10 | $(rel)/%.com: $(rel)/%.asm 11 | $(QP)echo " NASM $@" 12 | $(QR)$(NASM) -O6 -Isrc/ -I$(srcdir)/src/arch/ibmpc/ -f bin $< -o $@ 13 | 14 | $(rel)/%.sys: $(rel)/%.asm 15 | $(QP)echo " NASM $@" 16 | $(QR)$(NASM) -O6 -Isrc/ -I$(srcdir)/src/arch/ibmpc/ -f bin $< -o $@ 17 | 18 | 19 | # ---------------------------------------------------------------------- 20 | 21 | PCEUTILS_BAS_COM := pceboot pceexit pcemsg pcestop pcetime pcever 22 | PCEUTILS_BAS_SYS := pceemm pcehimem 23 | PCEUTILS_BAS := $(PCEUTILS_BAS_COM) $(PCEUTILS_BAS_SYS) 24 | PCEUTILS_SRC := $(foreach f,$(PCEUTILS_BAS),$(rel)/$(f).asm) 25 | PCEUTILS_BIN_COM := $(foreach f,$(PCEUTILS_BAS_COM),$(rel)/$(f).com) 26 | PCEUTILS_BIN_SYS := $(foreach f,$(PCEUTILS_BAS_SYS),$(rel)/$(f).sys) 27 | PCEUTILS_BIN := $(PCEUTILS_BIN_COM) $(PCEUTILS_BIN_SYS) 28 | PCEUTILS_SDP := src/config.inc src/arch/ibmpc/pce.inc 29 | 30 | CLN += $(PCEUTILS_BIN) 31 | DIST += $(PCEUTILS_SRC) 32 | 33 | ifeq "$(PCE_BUILD_IBMPC)" "1" 34 | ifeq "$(PCE_HAVE_NASM)" "1" 35 | TARGETS += $(PCEUTILS_BIN) 36 | SHARE_PCEUTILS := $(PCEUTILS_BIN) 37 | endif 38 | endif 39 | 40 | 41 | $(rel)/pceboot.com: $(rel)/pceboot.asm $(PCEUTILS_SDP) 42 | $(rel)/pceemm.sys: $(rel)/pceemm.asm $(PCEUTILS_SDP) 43 | $(rel)/pceexit.com: $(rel)/pceexit.asm $(PCEUTILS_SDP) 44 | $(rel)/pcehimem.sys: $(rel)/pcehimem.asm $(PCEUTILS_SDP) 45 | $(rel)/pcemsg.com: $(rel)/pcemsg.asm $(PCEUTILS_SDP) 46 | $(rel)/pcestop.com: $(rel)/pcestop.asm $(PCEUTILS_SDP) 47 | $(rel)/pcetime.com: $(rel)/pcetime.asm $(PCEUTILS_SDP) 48 | $(rel)/pcever.com: $(rel)/pcever.asm $(PCEUTILS_SDP) 49 | -------------------------------------------------------------------------------- /src/arch/sims32/cmd_s32.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/sims32/cmd_s32.h * 7 | * Created: 2004-09-28 by Hampa Hug * 8 | * Copyright: (C) 2004-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | void ss32_dasm_str (char *dst, s32_dasm_t *op); 24 | 25 | void ss32_prt_state_cpu (sparc32_t *c, FILE *fp); 26 | void ss32_prt_state_mem (sims32_t *sim, FILE *fp); 27 | 28 | void ss32_run (sims32_t *sim); 29 | 30 | int ss32_do_cmd (sims32_t *sim, cmd_t *cmd); 31 | 32 | void ss32_cmd_init (sims32_t *sim, monitor_t *mon); 33 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-imd.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-imd.h * 7 | * Created: 2010-08-14 by Hampa Hug * 8 | * Copyright: (C) 2010-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_IMD_H 24 | #define PSI_IMG_IMD_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | psi_img_t *psi_load_imd (FILE *fp); 31 | 32 | int psi_save_imd (FILE *fp, const psi_img_t *img); 33 | 34 | int psi_probe_imd_fp (FILE *fp); 35 | int psi_probe_imd (const char *fname); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-msa.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-msa.h * 7 | * Created: 2013-06-03 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_MSA_H 24 | #define PSI_IMG_MSA_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | psi_img_t *psi_load_msa (FILE *fp); 31 | 32 | int psi_save_msa (FILE *fp, const psi_img_t *img); 33 | 34 | int psi_probe_msa_fp (FILE *fp); 35 | int psi_probe_msa (const char *fname); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-psi.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-psi.h * 7 | * Created: 2013-05-29 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_PSI_H 24 | #define PSI_IMG_PSI_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | psi_img_t *psi_load_psi (FILE *fp); 31 | 32 | int psi_save_psi (FILE *fp, const psi_img_t *img); 33 | 34 | int psi_probe_psi_fp (FILE *fp); 35 | int psi_probe_psi (const char *fname); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-td0.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-td0.h * 7 | * Created: 2010-09-04 by Hampa Hug * 8 | * Copyright: (C) 2010-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_TD0_H 24 | #define PSI_IMG_TD0_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | psi_img_t *psi_load_td0 (FILE *fp); 31 | 32 | int psi_save_td0 (FILE *fp, const psi_img_t *img); 33 | 34 | int psi_probe_td0_fp (FILE *fp); 35 | int psi_probe_td0 (const char *fname); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/drivers/pri/pri-img-tc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/pri/pri-img-tc.h * 7 | * Created: 2012-02-01 by Hampa Hug * 8 | * Copyright: (C) 2012-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_PRI_IMG_TC_H 24 | #define PCE_PRI_IMG_TC_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | pri_img_t *pri_load_tc (FILE *fp); 31 | 32 | int pri_save_tc (FILE *fp, const pri_img_t *img); 33 | 34 | int pri_probe_tc_fp (FILE *fp); 35 | int pri_probe_tc (const char *fname); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/drivers/pri/pri-img-pri.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/pri/pri-img-pri.h * 7 | * Created: 2012-01-31 by Hampa Hug * 8 | * Copyright: (C) 2012-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_PRI_IMG_PRI_H 24 | #define PCE_PRI_IMG_PRI_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | pri_img_t *pri_load_pri (FILE *fp); 31 | 32 | int pri_save_pri (FILE *fp, const pri_img_t *img); 33 | 34 | int pri_probe_pri_fp (FILE *fp); 35 | int pri_probe_pfdc (const char *fname); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-dc42.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-dc42.h * 7 | * Created: 2011-07-09 by Hampa Hug * 8 | * Copyright: (C) 2011-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_DC42_H 24 | #define PSI_IMG_DC42_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | psi_img_t *psi_load_dc42 (FILE *fp); 31 | 32 | int psi_save_dc42 (FILE *fp, const psi_img_t *img); 33 | 34 | int psi_probe_dc42_fp (FILE *fp); 35 | int psi_probe_dc42 (const char *fname); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/drivers/pri/pri-img-pbit.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/pri/pri-img-pbit.h * 7 | * Created: 2012-01-31 by Hampa Hug * 8 | * Copyright: (C) 2012-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_PRI_IMG_PBIT_H 24 | #define PCE_PRI_IMG_PBIT_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | pri_img_t *pri_load_pbit (FILE *fp); 31 | 32 | int pri_save_pbit (FILE *fp, const pri_img_t *img); 33 | 34 | int pri_probe_pbit_fp (FILE *fp); 35 | int pri_probe_pfdc (const char *fname); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/lib/tun.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/lib/tun.h * 7 | * Created: 2004-12-15 by Hampa Hug * 8 | * Copyright: (C) 2004-2012 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_LIB_TUN_H 24 | #define PCE_LIB_TUN_H 1 25 | 26 | 27 | int tun_open (const char *name); 28 | int tap_open (const char *name); 29 | void tun_close (int fd); 30 | int tun_set_packet (int fd, const void *buf, unsigned cnt); 31 | int tun_get_packet (int fd, void *buf, unsigned *cnt); 32 | int tun_check_packet (int fd); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/drivers/char/char-pty.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/char/char-pty.h * 7 | * Created: 2009-03-08 by Hampa Hug * 8 | * Copyright: (C) 2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_DRIVERS_CHAR_PTY_H 24 | #define PCE_DRIVERS_CHAR_PTY_H 1 25 | 26 | 27 | #include 28 | 29 | #include 30 | 31 | 32 | typedef struct char_pty_t { 33 | char_drv_t cdrv; 34 | 35 | int fd; 36 | 37 | char *ptsname; 38 | char *symlink; 39 | } char_pty_t; 40 | 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/drivers/psi/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/drivers/psi/Makefile.inc 2 | 3 | rel := src/drivers/psi 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | DEV_PSI_BAS := \ 9 | psi-img-ana \ 10 | psi-img-cp2 \ 11 | psi-img-dc42 \ 12 | psi-img-imd \ 13 | psi-img-msa \ 14 | psi-img-pfdc \ 15 | psi-img-psi \ 16 | psi-img-raw \ 17 | psi-img-stx \ 18 | psi-img-tc \ 19 | psi-img-td0 \ 20 | psi-img-xdf \ 21 | psi-img \ 22 | psi-io \ 23 | psi 24 | 25 | DEV_PSI_BAS2 := \ 26 | psi-img-pfdc0 \ 27 | psi-img-pfdc1 \ 28 | psi-img-pfdc2 \ 29 | psi-img-pfdc4 30 | 31 | DEV_PSI_SRC := $(foreach f,$(DEV_PSI_BAS) $(DEV_PSI_BAS2),$(rel)/$(f).c) 32 | DEV_PSI_OBJ := $(foreach f,$(DEV_PSI_BAS) $(DEV_PSI_BAS2),$(rel)/$(f).o) 33 | DEV_PSI_HDR := $(foreach f,$(DEV_PSI_BAS),$(rel)/$(f).h) 34 | DEV_PSI_ARC := $(rel)/psi.a 35 | 36 | CLN += $(DEV_PSI_ARC) $(DEV_PSI_OBJ) 37 | DIST += $(DEV_PSI_SRC) $(DEV_PSI_HDR) 38 | 39 | $(rel)/psi-img-ana.o: $(rel)/psi-img-ana.c 40 | $(rel)/psi-img-cp2.o: $(rel)/psi-img-cp2.c 41 | $(rel)/psi-img-dc42.o: $(rel)/psi-img-dc42.c 42 | $(rel)/psi-img-imd.o: $(rel)/psi-img-imd.c 43 | $(rel)/psi-img-msa.o: $(rel)/psi-img-msa.c 44 | $(rel)/psi-img-pfdc.o: $(rel)/psi-img-pfdc.c 45 | $(rel)/psi-img-pfdc0.o: $(rel)/psi-img-pfdc0.c 46 | $(rel)/psi-img-pfdc1.o: $(rel)/psi-img-pfdc1.c 47 | $(rel)/psi-img-pfdc2.o: $(rel)/psi-img-pfdc2.c 48 | $(rel)/psi-img-pfdc4.o: $(rel)/psi-img-pfdc4.c 49 | $(rel)/psi-img-psi.o: $(rel)/psi-img-psi.c 50 | $(rel)/psi-img-raw.o: $(rel)/psi-img-raw.c 51 | $(rel)/psi-img-stx.o: $(rel)/psi-img-stx.c 52 | $(rel)/psi-img-tc.o: $(rel)/psi-img-tc.c 53 | $(rel)/psi-img-td0.o: $(rel)/psi-img-td0.c 54 | $(rel)/psi-img-xdf.o: $(rel)/psi-img-xdf.c 55 | $(rel)/psi-img.o: $(rel)/psi-img.c 56 | $(rel)/psi-io.o: $(rel)/psi-io.c 57 | $(rel)/psi.o: $(rel)/psi.c 58 | 59 | $(rel)/psi.a: $(DEV_PSI_OBJ) 60 | -------------------------------------------------------------------------------- /src/drivers/sound/sound-oss.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/sound/sound-oss.h * 7 | * Created: 2009-10-17 by Hampa Hug * 8 | * Copyright: (C) 2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_DRIVERS_SOUND_OSS_H 24 | #define PCE_DRIVERS_SOUND_OSS_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | typedef struct sound_oss_t { 31 | sound_drv_t sdrv; 32 | 33 | int sign; 34 | int big_endian; 35 | 36 | char *dev; 37 | int fd; 38 | } sound_oss_t; 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/drivers/char/char-stdio.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/char/char-stdio.h * 7 | * Created: 2009-03-06 by Hampa Hug * 8 | * Copyright: (C) 2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_DRIVERS_CHAR_STDIO_H 24 | #define PCE_DRIVERS_CHAR_STDIO_H 1 25 | 26 | 27 | #include 28 | 29 | #include 30 | 31 | 32 | typedef struct char_stdio_t { 33 | char_drv_t cdrv; 34 | 35 | char *fname; 36 | 37 | int flush; 38 | 39 | FILE *fp; 40 | } char_stdio_t; 41 | 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/utils/pri/main.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/pri/main.h * 7 | * Created: 2012-01-31 by Hampa Hug * 8 | * Copyright: (C) 2012-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PRI_MAIN_H 24 | #define PRI_MAIN_H 1 25 | 26 | 27 | #include 28 | #include 29 | 30 | 31 | typedef int (*pri_trk_cb) (pri_img_t *img, pri_trk_t *trk, 32 | unsigned long c, unsigned long h, void *opaque 33 | ); 34 | 35 | 36 | int pri_for_all_tracks (pri_img_t *img, pri_trk_cb fct, void *opaque); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-stx.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-stx.h * 7 | * Created: 2013-06-06 by Hampa Hug * 8 | * Copyright: (C) 2010-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_STX_H 24 | #define PSI_IMG_STX_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | extern char par_stx_dump_tracks; 31 | 32 | 33 | psi_img_t *psi_load_stx (FILE *fp); 34 | 35 | int psi_save_stx (FILE *fp, const psi_img_t *img); 36 | 37 | int psi_probe_stx_fp (FILE *fp); 38 | int psi_probe_stx (const char *fname); 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/utils/psi/reorder.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/psi/reorder.h * 7 | * Created: 2013-06-09 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_REORDER_H 24 | #define PSI_REORDER_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | int psi_interleave_tracks (psi_img_t *img, unsigned il); 31 | int psi_reorder_tracks (psi_img_t *img, const char *order); 32 | int psi_rotate_tracks (psi_img_t *img, unsigned first); 33 | int psi_sort_tracks (psi_img_t *img, int reverse); 34 | 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/drivers/psi/psi-img-pfdc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/psi/psi-img-pfdc.h * 7 | * Created: 2010-08-13 by Hampa Hug * 8 | * Copyright: (C) 2010-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_IMG_PFDC_H 24 | #define PSI_IMG_PFDC_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | #define PFDC_MAGIC 0x50464443 31 | 32 | 33 | psi_img_t *psi_load_pfdc (FILE *fp); 34 | 35 | int psi_save_pfdc (FILE *fp, const psi_img_t *img, unsigned vers); 36 | 37 | int psi_probe_pfdc_fp (FILE *fp); 38 | int psi_probe_pfdc (const char *fname); 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /doc/pce-ibmpc.txt: -------------------------------------------------------------------------------- 1 | PCE/ibmpc - IBM PC Emulator 2 | ============================================================================== 3 | 4 | PCE/ibmpc is an IBM PC emulator. It emulates most (but see below) of the 5 | hardware of an IBM PC 5150. The emulation is complete enough to boot DOS and 6 | run most DOS applications. 7 | 8 | Emulated parts: 9 | 10 | Part Status 11 | 12 | CPU An 8086/80186 emulator. The specific CPU model can be set 13 | to 8088, 8086, 80188 or 80186 at run time. 14 | 15 | BIOS An unmodified BIOS from an IBM PC or PC/XT is needed. 16 | 17 | 8237 DMAC Supported, but not particularily useful yet 18 | 19 | 8250 UART Supported 20 | 21 | 8253 PIT Only counting modes 0, 2 and 3 are supported at this time 22 | 23 | 8255 PPI Supported 24 | 25 | 8259 PIC Supported 26 | 27 | Sound Not yet supported 28 | 29 | Video Supported video cards are: MDA, CGA, Plantronics ColorPlus, 30 | Wyse 700, HGC, EGA, VGA 31 | 32 | EMS Supported, with a custom DOS driver. 33 | 34 | XMS Supported, with a custom DOS driver. 35 | 36 | Disks Only supported through INT 13h at the moment. 37 | 38 | Sound Not yet supported. 39 | 40 | Mouse A Microsoft serial mouse is emulated. 41 | 42 | Parallel Port Partially supported. Output is written to a file. 43 | 44 | Serial Port Supported. 45 | 46 | 47 | Configuration 48 | ============================================================================== 49 | 50 | PCE/ibmpc is configured by means of a config file. A documented example config 51 | file is installed in $(prefix)/etc/pce-ibmpc.cfg. 52 | 53 | 54 | Running PCE/ibmpc 55 | ============================================================================== 56 | 57 | After starting the emulator, pce is in command mode (unless the -r 58 | option was used). Type 'h' to get a short summary of the available 59 | commands. 60 | 61 | The 'g' command starts the simulation. It can be interrupted by 62 | pressing Ctrl-`. 63 | -------------------------------------------------------------------------------- /src/arch/ibmpc/m24.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/ibmpc/m24.h * 7 | * Created: 2012-01-07 by Hampa Hug * 8 | * Copyright: (C) 2012 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_IBMPC_M24_H 24 | #define PCE_IBMPC_M24_H 1 25 | 26 | 27 | #include "ibmpc.h" 28 | 29 | 30 | int m24_get_port8 (ibmpc_t *pc, unsigned long addr, unsigned char *val); 31 | int m24_set_port8 (ibmpc_t *pc, unsigned long addr, unsigned char val); 32 | 33 | void m24_set_video_mode (ibmpc_t *pc, unsigned mode); 34 | 35 | void pc_setup_m24 (ibmpc_t *pc, ini_sct_t *ini); 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/drivers/char/char-posix.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/char/char-posix.h * 7 | * Created: 2009-03-10 by Hampa Hug * 8 | * Copyright: (C) 2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_DRIVERS_CHAR_POSIX_H 24 | #define PCE_DRIVERS_CHAR_POSIX_H 1 25 | 26 | 27 | #include 28 | 29 | #include 30 | 31 | 32 | typedef struct { 33 | char_drv_t cdrv; 34 | 35 | char *name; 36 | char *name_read; 37 | char *name_write; 38 | 39 | int fd_read; 40 | int fd_write; 41 | } char_posix_t; 42 | 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/lib/iniata.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/lib/iniata.h * 7 | * Created: 2006-12-16 by Hampa Hug * 8 | * Copyright: (C) 2006-2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_LIB_INIATA_H 24 | #define PCE_LIB_INIATA_H 1 25 | 26 | 27 | #include 28 | 29 | #include 30 | #include 31 | 32 | #include 33 | 34 | 35 | int ini_get_ata_chn (ata_chn_t *ata, disks_t *dsks, ini_sct_t *sct, unsigned idx); 36 | int ini_get_pci_ata (pci_ata_t *pciata, disks_t *dsks, ini_sct_t *sct); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/lib/inidsk.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/lib/inidsk.h * 7 | * Created: 2004-12-13 by Hampa Hug * 8 | * Copyright: (C) 2004-2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_LIB_INIDSK_H 24 | #define PCE_LIB_INIDSK_H 1 25 | 26 | 27 | #include 28 | 29 | #include 30 | 31 | 32 | int dsk_insert (disks_t *dsks, const char *str, int eject); 33 | 34 | disk_t *ini_get_cow (ini_sct_t *sct, disk_t *dsk); 35 | 36 | int ini_get_disk (ini_sct_t *sct, disk_t **ret); 37 | 38 | disks_t *ini_get_disks (ini_sct_t *ini); 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/arch/rc759/cmd.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/rc759/cmd.h * 7 | * Created: 2012-06-29 by Hampa Hug * 8 | * Copyright: (C) 2012-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_RC759_CMD_H 24 | #define PCE_RC759_CMD_H 1 25 | 26 | 27 | #include "rc759.h" 28 | 29 | #include 30 | 31 | #include 32 | #include 33 | 34 | 35 | void print_state_cpu (e8086_t *c); 36 | 37 | void rc759_run (rc759_t *sim); 38 | 39 | int rc759_cmd (rc759_t *sim, cmd_t *cmd); 40 | 41 | void rc759_cmd_init (rc759_t *sim, monitor_t *mon); 42 | 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/arch/simarm/pce-simarm.cfg.in: -------------------------------------------------------------------------------- 1 | # pce-simarm.cfg 2 | # 3 | # Example config file 4 | 5 | section simarm { 6 | section cpu { 7 | # This has no effect yet 8 | model = "xscale" 9 | 10 | # Set to 1 for a big endian system 11 | bigendian = 0 12 | 13 | # The processor ID 14 | id = 0x69052000 15 | } 16 | 17 | # Multiple "ram" sections may be present 18 | section ram { 19 | # The linear base address 20 | address = 0x00000000 21 | 22 | # The size in bytes 23 | size = 0x04000000 24 | 25 | # The RAM image that is used to initialize the RAM (optional) 26 | file = "linux.bin" 27 | } 28 | 29 | # Multiple "rom" sections may be present 30 | section rom { 31 | # The file from which the rom code is loaded (optional) 32 | file = "simarm.rom" 33 | 34 | # The linear base address 35 | address = 0xffff0000 36 | 37 | # The rom size in bytes 38 | size = 65536 39 | } 40 | 41 | # load sections are processed after all ram and rom sections. 42 | section load { 43 | format = "ihex" 44 | file = "simarm.ihex" 45 | } 46 | 47 | section load { 48 | format = "binary" 49 | file = "rom.bin" 50 | address = 0xffff0000 51 | } 52 | 53 | # interrupt controller 54 | section intc { 55 | address = 0xd6000000 56 | } 57 | 58 | # timer 59 | section timer { 60 | address = 0xc0020000 61 | } 62 | 63 | # serial port 64 | section serial { 65 | address = 0xc0030000 66 | irq = 2 67 | 68 | # Up to multichar characters are sent or received 69 | # without any transmission delay. For a real serial port 70 | # this value is 1 but larger values can speed up 71 | # transmission. 72 | multichar = 1 73 | 74 | # Not all character drivers are supported on 75 | # all platforms. 76 | #driver = "null" 77 | driver = "stdio:file=uart0.out" 78 | #driver = "tios:file=/dev/ttyS0" 79 | } 80 | 81 | section console { 82 | serial = 0 83 | } 84 | 85 | section pci { 86 | irq = 15 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/utils/psi/comment.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/utils/psi/comment.h * 7 | * Created: 2013-06-09 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PSI_COMMENT_H 24 | #define PSI_COMMENT_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | int psi_add_comment (psi_img_t *img, const char *str); 31 | int psi_load_comment (psi_img_t *img, const char *fname); 32 | int psi_save_comment (psi_img_t *img, const char *fname); 33 | int psi_set_comment (psi_img_t *img, const char *str); 34 | int psi_show_comment (psi_img_t *img); 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/arch/atarist/main.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/atarist/main.h * 7 | * Created: 2011-03-17 by Hampa Hug * 8 | * Copyright: (C) 2011-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_ATARIST_MAIN_H 24 | #define PCE_ATARIST_MAIN_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | #define ST_CPU_CLOCK 8000000 31 | 32 | 33 | struct atari_st_s; 34 | typedef struct atari_st_s atari_st_t; 35 | 36 | 37 | extern int par_verbose; 38 | 39 | extern const char *par_terminal; 40 | 41 | extern atari_st_t *par_sim; 42 | 43 | 44 | void sim_stop (void); 45 | 46 | void st_log_deb (const char *msg, ...); 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/drivers/char/Makefile.inc: -------------------------------------------------------------------------------- 1 | # src/drivers/char/Makefile.inc 2 | 3 | rel := src/drivers/char 4 | 5 | DIRS += $(rel) 6 | DIST += $(rel)/Makefile.inc 7 | 8 | DRV_CHR_BAS := char char-mouse char-null char-stdio 9 | DRV_CHR_NBAS := 10 | 11 | ifeq "$(PCE_ENABLE_CHAR_POSIX)" "1" 12 | DRV_CHR_BAS += char-posix 13 | else 14 | DRV_CHR_NBAS += char-posix 15 | endif 16 | 17 | ifeq "$(PCE_ENABLE_CHAR_PPP)" "1" 18 | DRV_CHR_BAS += char-ppp 19 | else 20 | DRV_CHR_NBAS += char-ppp 21 | endif 22 | 23 | ifeq "$(PCE_ENABLE_CHAR_PTY)" "1" 24 | DRV_CHR_BAS += char-pty 25 | else 26 | DRV_CHR_NBAS += char-pty 27 | endif 28 | 29 | ifeq "$(PCE_ENABLE_CHAR_SLIP)" "1" 30 | DRV_CHR_BAS += char-slip 31 | else 32 | DRV_CHR_NBAS += char-slip 33 | endif 34 | 35 | ifeq "$(PCE_ENABLE_CHAR_TCP)" "1" 36 | DRV_CHR_BAS += char-tcp 37 | else 38 | DRV_CHR_NBAS += char-tcp 39 | endif 40 | 41 | ifeq "$(PCE_ENABLE_CHAR_TIOS)" "1" 42 | DRV_CHR_BAS += char-tios 43 | else 44 | DRV_CHR_NBAS += char-tios 45 | endif 46 | 47 | DRV_CHR_SRC := $(foreach f,$(DRV_CHR_BAS),$(rel)/$(f).c) 48 | DRV_CHR_NSRC := $(foreach f,$(DRV_CHR_NBAS),$(rel)/$(f).c) 49 | DRV_CHR_OBJ := $(foreach f,$(DRV_CHR_BAS),$(rel)/$(f).o) 50 | DRV_CHR_NOBJ := $(foreach f,$(DRV_CHR_NBAS),$(rel)/$(f).o) 51 | DRV_CHR_HDR := $(foreach f,$(DRV_CHR_BAS),$(rel)/$(f).h) 52 | DRV_CHR_NHDR := $(foreach f,$(DRV_CHR_NBAS),$(rel)/$(f).h) 53 | DRV_CHR_ARC := $(rel)/char.a 54 | 55 | CLN += $(DRV_CHR_OBJ) $(DRV_CHR_NOBJ) $(DRV_CHR_ARC) 56 | DIST += $(DRV_CHR_SRC) $(DRV_CHR_HDR) $(DRV_CHR_NSRC) $(DRV_CHR_NHDR) 57 | 58 | $(rel)/char.o: $(rel)/char.c 59 | $(rel)/char-mouse.o: $(rel)/char-mouse.c 60 | $(rel)/char-null.o: $(rel)/char-null.c 61 | $(rel)/char-posix.o: $(rel)/char-posix.c 62 | $(rel)/char-ppp.o: $(rel)/char-ppp.c 63 | $(rel)/char-pty.o: $(rel)/char-pty.c 64 | $(rel)/char-slip.o: $(rel)/char-slip.c 65 | $(rel)/char-stdio.o: $(rel)/char-stdio.c 66 | $(rel)/char-tcp.o: $(rel)/char-tcp.c 67 | $(rel)/char-tios.o: $(rel)/char-tios.c 68 | 69 | $(rel)/char.a: $(DRV_CHR_OBJ) 70 | -------------------------------------------------------------------------------- /src/arch/atarist/rp5c15.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/atarist/rp5c15.h * 7 | * Created: 2013-06-20 by Hampa Hug * 8 | * Copyright: (C) 2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_ATARIST_RP5C15_H 24 | #define PCE_ATARIST_RP5C15_H 1 25 | 26 | 27 | typedef struct { 28 | unsigned char mode; 29 | unsigned char bank0[16]; 30 | unsigned char bank1[16]; 31 | } rp5c15_t; 32 | 33 | 34 | void rp5c15_init (rp5c15_t *rtc); 35 | void rp5c15_free (rp5c15_t *rtc); 36 | 37 | unsigned char rp5c15_get_uint8 (rp5c15_t *rtc, unsigned long addr); 38 | void rp5c15_set_uint8 (rp5c15_t *rtc, unsigned long addr, unsigned char val); 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/arch/ibmpc/cmd.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/ibmpc/cmd.h * 7 | * Created: 2010-09-21 by Hampa Hug * 8 | * Copyright: (C) 2010-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_IBMPC_CMD_H 24 | #define PCE_IBMPC_CMD_H 1 25 | 26 | 27 | #include "ibmpc.h" 28 | 29 | #include 30 | 31 | #include 32 | #include 33 | 34 | 35 | void prt_state_cpu (e8086_t *c); 36 | 37 | void pc_run (ibmpc_t *pc); 38 | 39 | int pc_cmd (ibmpc_t *pc, cmd_t *cmd); 40 | 41 | void pc_cmd_init (ibmpc_t *pc, monitor_t *mon); 42 | 43 | void pc_run_emscripten (ibmpc_t *pc); 44 | void pc_run_emscripten_step (); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/drivers/pri/gcr-mac.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/pri/gcr-mac.h * 7 | * Created: 2012-02-01 by Hampa Hug * 8 | * Copyright: (C) 2012-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_PRI_GCR_MAC_H 24 | #define PCE_PRI_GCR_MAC_H 1 25 | 26 | 27 | #include 28 | #include 29 | 30 | 31 | psi_trk_t *pri_decode_gcr_trk (pri_trk_t *trk, unsigned h); 32 | psi_img_t *pri_decode_gcr (pri_img_t *img); 33 | 34 | int pri_encode_gcr_trk (pri_trk_t *dtrk, psi_trk_t *strk, unsigned fmt); 35 | int pri_encode_gcr_img (pri_img_t *dimg, psi_img_t *simg); 36 | pri_img_t *pri_encode_gcr (psi_img_t *img); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/devices/video/olivetti.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/devices/video/olivetti.h * 7 | * Created: 2011-09-26 by Hampa Hug * 8 | * Copyright: (C) 2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_VIDEO_OLIVETTI_H 24 | #define PCE_VIDEO_OLIVETTI_H 1 25 | 26 | 27 | #include 28 | 29 | #include 30 | #include 31 | 32 | 33 | void m24_init (cga_t *m24, unsigned long io, unsigned long addr, unsigned long size); 34 | 35 | void m24_free (cga_t *m24); 36 | 37 | cga_t *m24_new (unsigned long io, unsigned long addr, unsigned long size); 38 | 39 | video_t *m24_new_ini (ini_sct_t *sct); 40 | 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/arch/ibmpc/main.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/ibmpc/main.h * 7 | * Created: 2001-05-01 by Hampa Hug * 8 | * Copyright: (C) 2001-2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_IBMPC_MAIN_H 24 | #define PCE_IBMPC_MAIN_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | #define PCE_IBMPC_CLK0 14318184 31 | #define PCE_IBMPC_CLK1 (PCE_IBMPC_CLK0 / 3) 32 | #define PCE_IBMPC_CLK2 (PCE_IBMPC_CLK0 / 12) 33 | 34 | #define PCE_IBMPC_5150 1 35 | #define PCE_IBMPC_5160 2 36 | #define PCE_IBMPC_M24 4 37 | 38 | 39 | extern const char *par_terminal; 40 | extern const char *par_video; 41 | 42 | 43 | void pc_log_deb (const char *msg, ...); 44 | 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/arch/atarist/cmd.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/atarist/cmd.h * 7 | * Created: 2011-03-17 by Hampa Hug * 8 | * Copyright: (C) 2011-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_ATARIST_CMD_H 24 | #define PCE_ATARIST_CMD_H 1 25 | 26 | 27 | #include "atarist.h" 28 | 29 | #include 30 | #include 31 | 32 | 33 | void st_print_state_cpu (atari_st_t *sim); 34 | 35 | void st_run (atari_st_t *sim); 36 | 37 | int st_cmd (atari_st_t *sim, cmd_t *cmd); 38 | 39 | void st_cmd_init (atari_st_t *sim, monitor_t *mon); 40 | 41 | // emscripten specific run loop 42 | void st_run_emscripten (atari_st_t *sim); 43 | void st_run_emscripten_step (); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/arch/sim6502/main.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/sim6502/main.h * 7 | * Created: 2004-05-25 by Hampa Hug * 8 | * Copyright: (C) 2004-2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_SIM6502_MAIN_H 24 | #define PCE_SIM6502_MAIN_H 1 25 | 26 | 27 | #include 28 | 29 | #ifdef HAVE_UNISTD_H 30 | #include 31 | #endif 32 | 33 | #include "sim6502.h" 34 | 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | 42 | 43 | extern int par_verbose; 44 | 45 | extern sim6502_t *par_sim; 46 | 47 | extern unsigned par_sig_int; 48 | 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/utils/pce-img/pce-img.1: -------------------------------------------------------------------------------- 1 | .TH PCE-IMG 1 "2012-01-30" "HH" "pce" 2 | \ 3 | .SH NAME 4 | pce-img \- the PCE disk image utility 5 | 6 | .SH SYNOPSIS 7 | .BI "pce-img create" " [options] [output-file]" 8 | 9 | .BI "pce-img convert" " [options] [input-file] [options] [output-file]" 10 | 11 | .SH DESCRIPTION 12 | \fBpce-img\fR(1) is used to create and convert disk image files. 13 | 14 | .SH OPTIONS 15 | .TP 16 | .BI "-c, --cylinders " c 17 | Set the number of cylinders. 18 | \ 19 | .TP 20 | .BI "-C, --min-cluster-size " size 21 | Set the minimum cluster size for QED images. The default is 0. 22 | \ 23 | .TP 24 | .BI "-f, --offset " offset 25 | Set the starting offset of the disk image for formats that 26 | support it. 27 | \ 28 | .TP 29 | .BI "-g, --geometry " "c h s" 30 | Set the disk geometry. This is the same as using the \fB-c\fR, 31 | \fB-h\fR and \fB-s\fR options. 32 | \ 33 | .TP 34 | .BI "-h, --heads " h 35 | Set the number of heads. 36 | \ 37 | .TP 38 | .BI "-i, --input " filename 39 | Set the input file name. 40 | \ 41 | .TP 42 | .BI "-m, --megabytes " size 43 | Set the disk size in MiB. 44 | \ 45 | .TP 46 | .BI "-n, --size " blocks 47 | Set the disk size in 512 byte blocks. 48 | \ 49 | .TP 50 | .BI "-o, --output " filename 51 | Set the output file name. 52 | \ 53 | .TP 54 | .B "-q, --quiet" 55 | Be quiet. 56 | \ 57 | .TP 58 | .BI "-s, --sectors " s 59 | Set the number of sectors per track. 60 | \ 61 | .TP 62 | .BI "-w, --cow " filename 63 | Set the COW file name. 64 | \ 65 | .TP 66 | .B --help 67 | Print usage information. 68 | \ 69 | .TP 70 | .B --version 71 | Print version information. 72 | 73 | .SH EXAMPLES 74 | Create a 1 GiB PIMG image: 75 | .IP 76 | $ pce-img create -m 1024 -o image.pimg 77 | .PP 78 | Create a 10 MB PIMG image 79 | .IP 80 | $ pce-img create -g 306 4 17 -o image.pimg 81 | .PP 82 | Convert a PIMG image to a raw image 83 | .IP 84 | $ pce-img convert source.pimg dest.img 85 | 86 | .SH SEE ALSO 87 | .BR pce-ibmpc "(1)," 88 | .BR pce-macplus "(1)," 89 | .BR pfdc "(1)" 90 | 91 | .SH AUTHOR 92 | Hampa Hug 93 | -------------------------------------------------------------------------------- /src/drivers/sound/sound-wav.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/sound/sound-wav.h * 7 | * Created: 2009-10-18 by Hampa Hug * 8 | * Copyright: (C) 2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_DRIVERS_SOUND_WAV_H 24 | #define PCE_DRIVERS_SOUND_WAV_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | void snd_wav_close (sound_drv_t *sdrv); 31 | int snd_wav_write (sound_drv_t *sdrv, const uint16_t *buf, unsigned cnt); 32 | int snd_wav_set_params (sound_drv_t *sdrv, unsigned chn, unsigned long srate, int sign); 33 | int snd_wav_set_params (sound_drv_t *sdrv, unsigned chn, unsigned long srate, int sign); 34 | int snd_wav_init (sound_drv_t *sdrv, const char *name); 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/drivers/video/null.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/video/null.h * 7 | * Created: 2003-10-18 by Hampa Hug * 8 | * Copyright: (C) 2003-2011 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_VIDEO_NULL_H 24 | #define PCE_VIDEO_NULL_H 1 25 | 26 | 27 | #include 28 | 29 | #include 30 | #include 31 | 32 | 33 | typedef struct { 34 | terminal_t trm; 35 | } null_t; 36 | 37 | 38 | /*!*************************************************************************** 39 | * @short Create a new null terminal 40 | *****************************************************************************/ 41 | terminal_t *null_new (ini_sct_t *ini); 42 | 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/arch/macplus/cmd_68k.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/macplus/cmd_68k.h * 7 | * Created: 2007-04-15 by Hampa Hug * 8 | * Copyright: (C) 2007-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_MACPLUS_CMD_68K_H 24 | #define PCE_MACPLUS_CMD_68K_H 1 25 | 26 | 27 | #include "macplus.h" 28 | 29 | #include 30 | #include 31 | 32 | 33 | void mac_prt_state (macplus_t *sim, const char *str); 34 | 35 | void mac_run (macplus_t *sim); 36 | 37 | int mac_cmd (macplus_t *sim, cmd_t *cmd); 38 | 39 | void mac_cmd_init (macplus_t *sim, monitor_t *mon); 40 | 41 | // emscripten specific run loop 42 | void mac_run_emscripten (macplus_t *sim); 43 | void mac_run_emscripten_step (); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/arch/atarist/mem.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/atarist/mem.h * 7 | * Created: 2011-03-17 by Hampa Hug * 8 | * Copyright: (C) 2011-2013 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_ATARIST_MEM_H 24 | #define PCE_ATARIST_MEM_H 1 25 | 26 | 27 | unsigned char st_mem_get_uint8 (void *ext, unsigned long addr); 28 | unsigned short st_mem_get_uint16 (void *ext, unsigned long addr); 29 | unsigned long st_mem_get_uint32 (void *ext, unsigned long addr); 30 | 31 | void st_mem_set_uint8 (void *ext, unsigned long addr, unsigned char val); 32 | void st_mem_set_uint16 (void *ext, unsigned long addr, unsigned short val); 33 | void st_mem_set_uint32 (void *ext, unsigned long addr, unsigned long val); 34 | 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/drivers/char/char-tcp.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/char/char-tcp.h * 7 | * Created: 2009-03-06 by Hampa Hug * 8 | * Copyright: (C) 2009-2012 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_DRIVERS_CHAR_TCP_H 24 | #define PCE_DRIVERS_CHAR_TCP_H 1 25 | 26 | 27 | #include 28 | 29 | #include 30 | 31 | 32 | typedef struct char_tcp_t { 33 | char_drv_t cdrv; 34 | 35 | int connect; 36 | int telnet; 37 | int telnetinit; 38 | int usectl; 39 | 40 | char *host; 41 | unsigned port; 42 | 43 | int listen_fd; 44 | int fd; 45 | 46 | unsigned ctl; 47 | 48 | unsigned telnet_state; 49 | } char_tcp_t; 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/drivers/char/char-slip.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/drivers/char/char-slip.h * 7 | * Created: 2009-11-01 by Hampa Hug * 8 | * Copyright: (C) 2009 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_DRIVERS_CHAR_SLIP_H 24 | #define PCE_DRIVERS_CHAR_SLIP_H 1 25 | 26 | 27 | #include 28 | 29 | 30 | #define SLIP_BUF_MAX 4096 31 | 32 | 33 | typedef struct char_slip_t { 34 | char_drv_t cdrv; 35 | 36 | char *tun_name; 37 | int tun_fd; 38 | 39 | unsigned out_cnt; 40 | char out_esc; 41 | unsigned char out[SLIP_BUF_MAX]; 42 | 43 | unsigned inp_idx; 44 | unsigned inp_cnt; 45 | unsigned char inp[SLIP_BUF_MAX]; 46 | } char_slip_t; 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/lib/getopt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/lib/getopt.h * 7 | * Created: 2009-10-21 by Hampa Hug * 8 | * Copyright: (C) 2009-2010 Hampa Hug * 9 | *****************************************************************************/ 10 | 11 | /***************************************************************************** 12 | * This program is free software. You can redistribute it and / or modify it * 13 | * under the terms of the GNU General Public License version 2 as published * 14 | * by the Free Software Foundation. * 15 | * * 16 | * This program is distributed in the hope that it will be useful, but * 17 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 | * Public License for more details. * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef PCE_LIB_GETOPT_H 24 | #define PCE_LIB_GETOPT_H 1 25 | 26 | 27 | #define GETOPT_DONE -1 28 | #define GETOPT_UNKNOWN -2 29 | #define GETOPT_MISSING -3 30 | 31 | 32 | typedef struct { 33 | short name1; 34 | unsigned short argcnt; 35 | const char *name2; 36 | const char *argdesc; 37 | const char *optdesc; 38 | } pce_option_t; 39 | 40 | 41 | void pce_getopt_help (const char *tag, const char *usage, pce_option_t *opt); 42 | 43 | int pce_getopt (int argc, char **argv, char ***arg, pce_option_t *opt); 44 | 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/arch/sim405/sercons.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/arch/sim405/sercons.h * 7 | * Created: 2004-06-01 by Hampa Hug * 8 | * Copyright: (C) 2004-2009 Hampa Hug * 9 | * Copyright: (C) 2004-2006 Lukas Ruf * 10 | *****************************************************************************/ 11 | 12 | /***************************************************************************** 13 | * This program is free software. You can redistribute it and / or modify it * 14 | * under the terms of the GNU General Public License version 2 as published * 15 | * by the Free Software Foundation. * 16 | * * 17 | * This program is distributed in the hope that it will be useful, but * 18 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 20 | * Public License for more details. * 21 | *****************************************************************************/ 22 | 23 | /***************************************************************************** 24 | * This software was developed at the Computer Engineering and Networks * 25 | * Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich. * 26 | *****************************************************************************/ 27 | 28 | 29 | #ifndef PCE_SIM405_SERCONS_H 30 | #define PCE_SIM405_SERCONS_H 1 31 | 32 | 33 | void scon_check (sim405_t *sim); 34 | 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /scripts/30-afterbuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | echo "converting bitcode to javascript for target: ${PCEJS_TARGET}" 5 | 6 | cleanup_file() { 7 | if [ -a "$1" ]; then 8 | rm "$1" 9 | fi 10 | } 11 | 12 | copy_if_present() { 13 | if [ -a "$1" ]; then 14 | cp "$1" "$2" 15 | fi 16 | } 17 | 18 | PCEJS_REPO_ROOT=$(git rev-parse --show-toplevel) 19 | 20 | cp "${PCEJS_PREFIX}/bin/pce-${PCEJS_TARGET}" "${PCEJS_PREFIX}/bin/pce-${PCEJS_TARGET}.bc" 21 | # EMCC_DEBUG=2 22 | "${PCEJS_EMSDK_PATH}/emcc" "${PCEJS_PREFIX}/bin/pce-${PCEJS_TARGET}.bc" \ 23 | -o "${PCEJS_PREFIX}/bin/pce-${PCEJS_TARGET}.${PCEJS_OUTPUT_FORMAT}" \ 24 | $PCEJS_EMFLAGS \ 25 | $PCEJS_MAKE_CFLAGS 26 | 27 | 28 | cp "${PCEJS_PREFIX}/bin/pce-${PCEJS_TARGET}.${PCEJS_OUTPUT_FORMAT}" "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.${PCEJS_OUTPUT_FORMAT}" 29 | 30 | # emscripten pthread js 31 | cleanup_file "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.pthread-main.js" 32 | copy_if_present "${PCEJS_PREFIX}/bin/pthread-main.js" "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.pthread-main.js" 33 | 34 | # emscripten proxy-to-worker js 35 | cleanup_file "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.worker.js" 36 | copy_if_present "${PCEJS_PREFIX}/bin/pce-${PCEJS_TARGET}.worker.js" "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.worker.js" 37 | 38 | # emscripten mem init file 39 | cleanup_file "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.js.mem" 40 | copy_if_present "${PCEJS_PREFIX}/bin/pce-${PCEJS_TARGET}.js.mem" "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.js.mem" 41 | 42 | # wasm 43 | cleanup_file "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.wasm" 44 | copy_if_present "${PCEJS_PREFIX}/bin/pce-${PCEJS_TARGET}.wasm" "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.wasm" 45 | cleanup_file "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.wasm.map" 46 | copy_if_present "${PCEJS_PREFIX}/bin/pce-${PCEJS_TARGET}.wasm.map" "${PCEJS_PACKAGEDIR}/pce-${PCEJS_TARGET}.wasm.map" 47 | 48 | # extension rom files 49 | copy_if_present "${PCEJS_PREFIX}/share/pce/${PCEJS_TARGET}/${PCEJS_TARGET}-pcex.rom" "${PCEJS_PACKAGEDIR}/data/${PCEJS_TARGET}/${PCEJS_TARGET}-pcex.rom" 50 | 51 | -------------------------------------------------------------------------------- /src/devices/video/wy700.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pce * 3 | *****************************************************************************/ 4 | 5 | /***************************************************************************** 6 | * File name: src/devices/video/wy700.h * 7 | * Created: 2008-10-13 by John Elliott * 8 | * Copyright: (C) 2008-2009 Hampa Hug * 9 | * (C) 2008 John Elliott * 10 | *****************************************************************************/ 11 | 12 | /***************************************************************************** 13 | * This program is free software. You can redistribute it and / or modify it * 14 | * under the terms of the GNU General Public License version 2 as published * 15 | * by the Free Software Foundation. * 16 | * * 17 | * This program is distributed in the hope that it will be useful, but * 18 | * WITHOUT ANY WARRANTY, without even the implied warranty of * 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 20 | * Public License for more details. * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef PCE_VIDEO_WY700_H 25 | #define PCE_VIDEO_WY700_H 1 26 | 27 | 28 | #include 29 | 30 | #include 31 | #include 32 | 33 | 34 | void wy700_init (cga_t *wy, unsigned long io, unsigned long addr, unsigned long size); 35 | 36 | void wy700_free (cga_t *wy); 37 | 38 | cga_t *wy700_new (unsigned long io, unsigned long addr, unsigned long size); 39 | 40 | video_t *wy700_new_ini (ini_sct_t *sct); 41 | 42 | 43 | #endif 44 | --------------------------------------------------------------------------------