6502.ts 中文文档教程

发布于 3年前 浏览 22 项目主页 更新于 3年前

Build Status

What is it?

6502.ts 努力成为用 Typescript 编写的基于 6502 的系统的模拟器集合。 它目前提供

该项目将 NodeJS 和浏览器作为运行时环境(节点上没有视频或音频, 当然)。

Atari 2600 emulation

6502.ts 为 Atari 2600 VCS 实现了一个成熟的模拟器。 除了 调试器,有两种使用模拟器

  • Stellerator allows to import, manage and play VCS ROMs in the browser. ROMs are stored locally in the browser. It is responsive and can be used offline as a homescreen application on iOS. Stellerator is hosted on github.io.
  • Stellerator (legacy) is the old version of Stellerator. It is not developed anymore, but still hosted on github.io.
  • Stellerator embedded offers a rich API to embed VCS emulation into web sites and web applications. Please check out the documentation for more information.

Tooling

的方法 模拟器核心是用 Typescript 编写的。 Stellerator 前端主要使用 Elm 编写并使用 用 SASS 编写的自定义 CSS 主题。 目前正在构建 使用 rollupYarn 创建 用于包管理。

Building and development

6502.ts 使用 Yarn 进行包管理,所以你会 必须先安装它。 检查回购协议后,请

    yarn install

拉入所需的包。

Tests

测试运行

    yarn test

Stellerator

Stellerator 前端通过做

    yarn build

构建完成后,可以在 dist 目录中找到已编译的前端。

对于开发,rollup 可以通过将

    yarn watch

开发构建写入 dist-dev 以监视模式运行。 对于这些构建,Elm 在开发模式下运行, 编译后的代码是未压缩的,并且跳过了 service worker 注册。

Rollup 不捆绑开发服务器,所以 live-server 而是使用。 运行

    yarn stellerator

将启动 live-server 并在 localhost:8080 上为 Stellerator 的开发构建提供服务 实时重装。

CLI

一些工具仅作为 CLI 提供(特别是 ehBasic 硬件监视器)。 那些可以是 通过做

    yarn tsc

构建构建后,编译(模块化)代码在compiled目录中可用, 并且这些工具在 compiled/bin 中可用。

NPM package

模拟器的核心部分作为 6502.tsNPM。 该包包括 TypeScript 类型,可以直接在 TypeScript 项目中使用。

大多数 API 现在都相当稳定,但还没有文档记录,除了 嵌入了 Stellerator。 请查看 文档 嵌入的 Stellerator 以获取更多详细信息。

License and credits

The MIT license

版权所有 (c) 2014 -- 2020 Christian Speckner 和贡献者

特此免费向任何获得副本的人授予许可 本软件和相关文档文件(“软件”),处理 在软件中不受限制,包括但不限于权利 使用、复制、修改、合并、发布、分发、再许可和/或出售 该软件的副本,并允许该软件是 提供这样做,但须满足以下条件:

上述版权声明和本许可声明应包含在所有 软件的副本或重要部分。

本软件“按原样”提供,不提供任何形式的明示或保证 暗示的,包括但不限于适销性保证, 适用于特定目的和非侵权。 在任何情况下都不得 作者或版权持有人对任何索赔、损害或其他 责任,无论是在合同、侵权或其他方面的行为中,由以下原因引起, 出于或与软件或使用或其他交易有关 软件。

Third party code

这些许可条件不适用于 aux 目录的内容 大多数都是我以外的人写的。 具体来说:

  • 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 墨盒类型检测代码(以及一些更奇特的墨盒类型) 以优秀的 Stella 为蓝本 模拟器。 最初的 2600 音频代码由 Martin Schröder 提供。 手臂 DPC+ 中的支持由 David Welch 提供支持 thumbulator,转译为 JS emscripten。 周期精确的 PCM 音频源自 Chris Brenner 所做的工作。 网站图标和主屏幕图标 在 Stellerator 中是从 Stella 那里拿走的。

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

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. It is responsive and can be used offline as a homescreen application on iOS. Stellerator is hosted on github.io.
  • Stellerator (legacy) is the old version of Stellerator. It is not developed anymore, but still hosted on github.io.
  • Stellerator embedded offers a rich API to embed VCS emulation into web sites and web applications. Please check out the documentation for more information.

Tooling

The emulation core is written in Typescript. The Stellerator frontend is mostly written in the Elm and uses a custom CSS theme written in SASS. Builds are currently created with rollup, and Yarn is used for package management.

Building and development

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

    yarn install

to pull in the required packages.

Tests

Test are run with

    yarn test

Stellerator

The Stellerator frontend is built by doing

    yarn build

After the build has finished, the compiled frontend can be found in the dist directory.

For development, rollup can be run in watch mode via

    yarn watch

Development builds are written to dist-dev. For these builds, Elm runs in development mode, the compiled code is unminified, and the service worker registration is skipped.

Rollup does not bundle a development server, so live-server is used instead. Running

    yarn stellerator

will fire up live-server and serve the development build of Stellerator on localhost:8080 with live reloading.

CLI

Several tools are available as CLI only (notably the ehBasic hardware monitor). Those can be built by doing

    yarn tsc

After building, the compiled (modularized) code is available in the compiled directory, and the tools are availabe in compiled/bin.

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

The MIT license

Copyright (c) 2014 -- 2020 Christian Speckner and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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. The favicon and homescreen icons in Stellerator were taken from Stella.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文