A Visual Studio Code extension for 6502 assembly programming with an integrated Apple IIe emulator.
-
6502/65c02 Assembly Language Support
- Syntax highlighting for 6502/65c02 assembly
- IntelliSense with instruction completion
- Hover documentation for instructions
- Apple II specific memory address completion
-
Integrated Apple IIe Emulator
- Built-in Apple IIe emulator via Apple2TS
- Load and run assembled programs directly
- Visual debugging capabilities
- Apple II specific features and memory mapping
-
Build System
- Support for 64tass, cl65, and Merlin32 assemblers
- F5 to build and run in emulator
- Assembly output and error reporting
- Clone this repository
- Open in VS Code
- Install dependencies:
npm install - Press F5 to run the extension in a new Extension Development Host window
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/- Create a new file with extension
.s,.asm, or.a65 - Start typing 6502 assembly instructions
- Use IntelliSense (Ctrl+Space) for instruction completion
; 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- 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
- 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
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
- Memory-mapped I/O locations ($C000-$CFFF)
- Screen memory ($0400-$07FF for text mode)
- Common system addresses and vectors
- Apple II specific assembler directives
Configure the extension in VS Code settings.
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
npm install
npm run compilenpm run packagecode --install-extension *.vsix --forceThen do Ctrl/Cmd+Shift+P -> Developer:Reload Window to reload VS Code.
Install the Github Changelog Generator by running:
gem install github_changelog_generatorYou 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 mainIf 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- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license - see the LICENSE file for details.
- Based on the Apple2TS TypeScript Apple IIe emulator
- Assembly Lines: The Complete Book by Roger Wagner
- 64tass
- cl65 and ca65
- Merlin32
- VS Code Language Extension
- VS Code Extension Publishing
