Octo:一个Chip8集成开发环境
Octo: A Chip8 IDE

原始链接: https://github.com/JohnEarnest/Octo

Octo是一个为Chip8虚拟机设计的综合汇编器,提供程序创建、测试和分享工具。它既可以作为桌面环境使用,也可以通过Node.js作为命令行工具,实现汇编、反汇编和卡带创建(.gif文件嵌入代码和元数据)。 用户可以将程序导出为独立的HTML5版本,方便托管(例如在Itch.io上),并配置自适应多点触控控制,用于移动设备游玩。Octo利用选项文件(JSON)来自定义功能和调色板。 一个“分享”功能提供代码和配置的URL,实验性工具如“Doct”旨在构建独立二进制文件。Octo的所有资源都以MIT许可证开源,鼓励贡献。更多信息和示例可在Itch.io上找到。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 Octo: 一个 Chip8 IDE (github.com/johnearnest) 7 分,by tosh 1 小时前 | 隐藏 | 过去 | 收藏 | 1 条评论 anthk 9 分钟前 [–] 我喜欢这些小型的虚拟机,感谢模拟器让我沉迷其中二十年。一个用 AWK 编写的 Chip8 解释器,并借助 coreutils 的帮助(模拟 C 中的 getchar 以获取单个字符;如果你能在不使用 GNU od 或 read 的情况下在 AWK 中做到,敬请指教):https://git.luxferre.top/dale-8a/log.html OpenBSD 和其他 BSD 用户:你需要从 ports 安装 'coreutils',打开 'dale8a.wk' 和 'tgl.awk',并将 'od -' 重命名为 'ggod -'。 证明它有效:https://0x0.st/KC_k.png 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Title Image

Octo is a high-level assembler for the Chip8 virtual machine, complete with an environment for testing programs, and tools for sharing your creations. Read about the project on Itch.io!

IDE Screenshot

General information:

Third-party tools and references:

Third-party games, programs and libraries:

If you've built a project on, with, or for Octo and you'd like to have a link added to this list, submit a pull request!

The Octo assembler can also be used as a command-line tool via a Node.js frontend:

$ ./octo
usage: octo [--decompile] [--options <file.json>] <source> [<destination>]
       if <source> has a .gif extension, unpack an existing octo cartridge.
       if <destination> has a .gif extension, create an octo cartridge file.
       if <destination> has an .html extension, create a standalone HTML5 build.
       if the specified options file does not exist, a new template will be created.

$ cat simple.8o
	: main
		va := 1
		vb := 2

$ ./octo simple.8o simple.ch8

$ hexdump simple.ch8
	0000000 6a 01 6b 02
	0000004

The --decompile option can be used to send an existing Chip8 binary through Octo's general-purpose decompiler.

The --options option allows you to specify a JSON file with settings for all of Octo's feature flags and palette configuration, which will be used for exports and as hints during decompilation. If the specified file does not exist, a template will be created with default settings.

If you're interested in using Octo from the command line, you might like c-octo.

Octo has a share feature which stores source code and configuration metadata and produces a URL you can share with others. By default, Octo stores programs in its own backend, indexed based on a key.

Using the "Save HTML" button in the "Binary Tools" panel of the toolbox, you can generate a single HTML file containing the Octo emulator and your program, allowing you to easily host a game yourself or on sites like Itch.io. Octo can be configured to offer adaptive multitouch controls, making your games playable on mobile devices and tablets!

Screenshot of HTML export dialog

Octo can also save "Cartridges" which embed programs and their metadata in an animated GIF. Cartridges are easy to share via email or image hosting sites, and include the source code of your programs, so others can riff on your creations:

Cartridge Example

Finally, Doct is an experimental tool for building standalone binaries which run Octo programs. Give it a whirl!

Octo, along with all its associated documentation, examples and tooling, are made available under the MIT license. See LICENSE.txt for additional details. If for any reason this is insufficiently flexible or permissive for some application, please contact John Earnest with your request. Contributions to this repository are welcome, with the understanding that they will fall under the same licensing conditions.

联系我们 contact @ memedata.com