Apple2TS Studio
A Visual Studio Code extension for 6502 assembly programming with an integrated Apple IIe emulator.

Features
Installation
From Source
- Clone this repository
- Open in VS Code
- Install dependencies:
npm install
- Press F5 to run the extension in a new Extension Development Host window
Prerequisites
For advanced assembly features, install a macro assembler such as 64tass, cl65, or Merlin32.
For example, to install the 64tass assembler:
# macOS with MacPorts
sudo port install 64tass
# macOS with Homebrew
brew install 64tass
# Ubuntu/Debian
sudo apt-get install 64tass
# Windows
# Download from https://sourceforge.net/projects/tass64/
Usage
Creating a 6502 Assembly File
- Create a new file with extension
.s, .asm, or .a65
- Start typing 6502 assembly instructions
- Use IntelliSense (Ctrl+Space) for instruction completion
Example Program
; Simple Hello World for Apple II using 64tass syntax
* = $0800
start:
lda #$48 ; Load 'H'
sta $0400 ; Store to screen
lda #$45 ; Load 'E'
sta $0401 ; Store to screen
; ... more instructions
rts
Building and Running
- Open a 6502 assembly file
- Press F5 or use Command Palette: "Apple2TS: Build & Run in Emulator"
- The emulator window will open and your program will be loaded
Commands
- Apple2TS: Launch Apple IIe Emulator - Opens the emulator panel
- Apple2TS: Build & Run in Emulator - Assembles current file and runs in emulator
- Apple2TS: Assemble Current File - Assembles without running
6502 Instruction Set
The extension provides complete support for the 65c02 instruction set with:
- All official opcodes (ADC, AND, ASL, BCC, etc.)
- Multiple addressing modes
- Cycle count information
- Detailed instruction documentation
Apple II Features
- Memory-mapped I/O locations ($C000-$CFFF)
- Screen memory ($0400-$07FF for text mode)
- Common system addresses and vectors
- Apple II specific assembler directives
Configuration
Configure the extension in VS Code settings.
Development
Project Structure
apple2ts-studio/
├── src/
│ ├── assembler.ts # Assembly toolchain integration
│ ├── emulatorPanel.ts # Webview-based emulator
│ ├── extension.ts # Main extension file
│ └── languageFeatures.ts # Language server features
├── syntaxes/
│ └── asm6502.tmGrammar.json # Syntax highlighting
└── examples/
└── hello_*.s # Sample assembly programs
└── graphics.s # Sample assembly program
└── 65c02_complete_demo.s # All 65c02 instructions and address modes
Building
npm install
npm run compile
Packaging
npm run package
Installing and Reload
code --install-extension *.vsix --force
Then do Ctrl/Cmd+Shift+P -> Developer:Reload Window to reload VS Code.
Update CHANGELOG
Install the Github Changelog Generator by running:
gem install github_changelog_generator
You may need to update to Ruby v3.x to install this gem.
Go through the commits, and add any missing tags. For a given commit sha (say 1befdec), checkout the commit, force the date to be the commit date, and then add the tag:
git checkout 1befdec # skip this if you want changelog for most recent code
GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)"
git tag -a v0.9 -m"v0.9" # bump this each time, and change it here as well
git push origin --tags
git checkout main
If you don't already have one, generate a Github token to run the Changelog Generator script with authentication. You only need "repo" scope for private repositories.
Now run the script:
github_changelog_generator --token xxxxx -u ct6502 -p apple2ts
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International
license - see the LICENSE file for details.
References