Emulators for MOS 6502 based systems written in TypeScript
TypeScript Assembly JavaScript HTML C++ CSS Other
Clone or download
Permalink
Failed to load latest commit information.
.vscode Update prettier, restrict it to ts and js. Jan 2, 2018
aux Dead code. Mar 5, 2018
bin Happy new year Ms. Sophie! Dec 31, 2017
deploy Setup travis for tagged releases. Jan 8, 2018
doc Touch control documentation. Apr 17, 2018
grunt Remove extraenous whitespace below license header. Nov 7, 2016
src Sanitize dependencies, fix JSR in disassembly. Apr 20, 2018
tests Refactoring to prepare for an eventual NPM release: Jan 1, 2018
tools Happy new year Ms. Sophie! Dec 31, 2017
web Add a homescreen icon. Apr 19, 2018
worker Minor tuning, add missing file. Jan 7, 2018
.gitattributes Created. Jul 22, 2014
.gitignore Generate archives during build. Jan 5, 2018
.prettierrc Enter prettier. Oct 19, 2017
.travis.yml Setup travis for tagged releases. Jan 8, 2018
CHANGELOG.md Changelog, bump version to 0.9.10 Feb 7, 2018
Gruntfile.js Uups, seems appcache templating got lost. Apr 19, 2018
LICENSE Relicense under GPLv2 or later. Nov 7, 2016
README.md Small doc changes. Jan 8, 2018
README.old.md Relicense under GPLv2 or later. Nov 7, 2016
package.json Sanitize dependencies, fix JSR in disassembly. Apr 20, 2018
tsconfig.base.json Refactoring to prepare for an eventual NPM release: Jan 1, 2018
tsconfig.json Refactoring to prepare for an eventual NPM release: Jan 1, 2018
tsconfig.npm.json Refactoring to prepare for an eventual NPM release: Jan 1, 2018
tslint.json Enter prettier. Oct 19, 2017
yarn.lock Add touch control layout dialog. Apr 18, 2018

README.md

Build Status

What is it?

6502.ts strives to be a collection of emulators for 6502 based systems written in Typescript. It currently provides

The projects targets both NodeJS and the browser as runtime environments (no video or audio on node, of course).

Pre-build applications

You can find recent builds of the various applications on the project's github.io page.

Atari 2600 emulation

6502.ts implements a full-fledged emulator for the Atari 2600 VCS. Apart from the debugger, there are two ways to use the emulator

  • Stellerator allows to import, manage and play VCS ROMs in the browser. ROMs are stored locally in the browser. Stellerator is hosted on github.io here.
  • Stellerator embedded offers a rich API to embed VCS emulation into web sites and web applications. Please check out the documentation for more information.

Building and development

6502.ts uses Yarn for package management, so you'll have to install it first. After checking out the repos, doing

yarn install
grunt initial

will initialize the development environment. You can then do a development build of all apps with a simple grunt. Production versions can be build with grunt build (currently only stellerator). grunt test will run the testsuite. A web server can be fired up with grunt serve.

After building, additional NodeJS applications for commandline debugging can be found in bin.

Please check the Gruntfile.js for more build targets.

NPM package

The core parts of the emulator are available as 6502.ts on NPM. The package includes TypeScript typings and can be used directly in TypeScript projects.

Most APIs are pretty stable by now, but not documented yet, with the exception of Stellerator embedded. Please check out the documentation of Stellerator embedded for more details.

License and credits

GNU General Public License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Third party code

These license conditions do not apply to the contents of the aux directory which mostly were written by folks other than me. Specifically:

  • ehBasic was taken from Jeff Tranters repository here
  • Klaus Dormann's 6502 testsuite (found in aux/6502_suite) was taken from his repository on github here and is licensed under the GPL.
  • The red_line sample was taken from Kirk Israel's 2600 programming tutorial on AtariAge. The line_test is a modified version of this code.
  • The playfield_1 sample was taken from Kirk Israel's 2600 cookbook.
  • playfield_2 was taken from Andrew Davie's 2600 programming excercises on AtariAge.
  • The macro.h and vcs.h headers can be found free-floating on the internet
  • flapping is a homebrew game written by Kirk Israel available here.

2600 cartridge type detection code (and some of the more exotic cartridge types) were modelled after the excellent Stella emulator. Initial 2600 audio code was contributed by Martin Schröder. ARM support in DPC+ is powered by David Welch's thumbulator, transpiled to JS with emscripten. Cycle-accurate PCM audio is derives from work done by Chris Brenner.