{"id":48128194,"url":"https://github.com/blendsdk/blend65","last_synced_at":"2026-04-04T16:28:20.144Z","repository":{"id":331366429,"uuid":"1126355054","full_name":"blendsdk/blend65","owner":"blendsdk","description":"Multi-target compiled language for 6502 family game development. Write once, compile to C64, Commander X16, VIC-20, Atari 2600, and more. Zero-overhead hardware APIs with deterministic performance.","archived":false,"fork":false,"pushed_at":"2026-02-23T21:08:00.000Z","size":9719,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-29T16:08:24.213Z","etag":null,"topics":["6502","atari","blend65","commander-x16","commodore","commodore-64","commodore128","compiler","game-development","homebrew","programming-language","retro-computing"],"latest_commit_sha":null,"homepage":"https://blend65.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blendsdk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-01T18:21:53.000Z","updated_at":"2026-02-10T06:13:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/blendsdk/blend65","commit_stats":null,"previous_names":["blendsdk/blend64"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blendsdk/blend65","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blendsdk%2Fblend65","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blendsdk%2Fblend65/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blendsdk%2Fblend65/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blendsdk%2Fblend65/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blendsdk","download_url":"https://codeload.github.com/blendsdk/blend65/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blendsdk%2Fblend65/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31405701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["6502","atari","blend65","commander-x16","commodore","commodore-64","commodore128","compiler","game-development","homebrew","programming-language","retro-computing"],"created_at":"2026-04-04T16:28:20.040Z","updated_at":"2026-04-04T16:28:20.135Z","avatar_url":"https://github.com/blendsdk.png","language":"TypeScript","readme":"# Blend65\n\n\u003e **⚠️ DEVELOPMENT STATUS: 60-70% COMPLETE**\n\u003e\n\u003e The compiler frontend is fully functional with production-quality lexer, parser, and semantic analyzer.\n\u003e The backend (IL generation and 6502 code generation) is in development. While the compiler can parse\n\u003e and validate Blend65 programs, it cannot yet generate executable code for the Commodore 64.\n\u003e\n\u003e **Current milestone**: 2,428 tests passing | Next phase: IL Generator\n\n## Overview\n\nBlend65 is a modern programming language compiler targeting 6502-based systems including the Commodore 64, VIC-20, and Commander X16. The language provides modern programming constructs while generating efficient assembly code for vintage hardware.\n\n## Language Features\n\nThe language syntax combines familiar programming concepts with direct hardware access:\n\n```js\nmodule C64Game.Snake\n\nimport setSpritePosition, enableSprite from c64.sprites\nimport joystickLeft, joystickRight from c64.input\nimport playNote from c64.sid\n\n@zp var snakeX: byte = 160     // Zero-page variable allocation\nvar score: word = 0            // 16-bit integer\nvar gameState: GameState = PLAYING\n\nenum GameState\n    MENU, PLAYING, GAME_OVER\nend enum\n\nfunction updateSnake(): void\n    if joystickLeft() then\n        snakeX = snakeX - 2\n    end if\n\n    setSpritePosition(0, snakeX, 100)\n\n    if snakeX == appleX then\n        score = score + 10\n        playNote(0, 440)\n    end if\nend function\n```\n\n### Storage Classes\n\nVariables can be declared with specific memory allocation strategies:\n\n- `@zp var` - Zero page allocation for fastest access\n- `@ram var` - Standard RAM allocation\n- `@data var` - Initialized data section\n- `var` - Same as `@ram var`\n\n### Memory-Mapped Hardware\n\nThe `@map` system provides type-safe access to hardware registers (unique to Blend65):\n\n```js\n// Simple register mapping\n@map borderColor at $D020: byte\n\n// Structured layout mapping\n@map vic at $D000 layout\n    spriteX: at $00: byte[8]\n    borderColor: at $20: byte\n    backgroundColor: at $21: byte\nend @map\n\n// Type-based mapping\n@map sid at $D400 type SIDRegisters\n\n// Usage - clean, self-documenting hardware access\nvic.borderColor = LIGHT_BLUE\nsid.voice1.frequency = 440\n```\n\n### Callback Functions\n\nType-safe function pointers enable interrupt-driven programming and behavioral dispatch:\n\n```js\ncallback interruptHandler: function(): void\ncallback behaviorFunction: function(entity: Entity): void\n\nvar rasterCallbacks: interruptHandler[8]\nvar enemyBehaviors: behaviorFunction[16]\n```\n\n## Target Platforms\n\n- **Commodore 64** - Full VIC-II, SID, and CIA support\n- **VIC-20** - VIA and basic graphics support\n- **Commander X16** - VERA graphics and enhanced features\n- **Generic 6502** - Basic instruction set compatibility\n\n## Implementation Status\n\n**Compiler Pipeline:**\n\n```\nSource → Lexer ✅ → Parser ✅ → AST ✅ → Semantic ✅ → IL 🔜 → CodeGen 🔜 → Assembly 🔜\n```\n\n### Completed (60-70%)\n\n| Component | Tests | Status |\n|-----------|-------|--------|\n| **Lexer** | 150+ | ✅ Production-ready |\n| **Parser** | 400+ | ✅ Production-ready |\n| **AST System** | 100+ | ✅ Production-ready |\n| **Semantic Analyzer** | 1,365+ | ✅ Production-ready |\n| **Advanced Analysis (Phase 8)** | 500+ | ✅ Complete |\n| **Hardware Analyzers (C64/C128/X16)** | 200+ | ✅ Complete |\n| **Integration Tests** | 313+ | ✅ Passing |\n\n**Semantic Analysis Highlights:**\n\n- Complete type checking with multi-module support\n- Control flow analysis with CFG construction\n- Definite assignment and variable usage tracking\n- Dead code and unused function detection\n- Data flow analysis (reaching definitions, liveness, constant propagation)\n- Escape analysis and purity analysis for optimization hints\n- C64-specific hardware analysis (VIC-II timing, SID conflict detection)\n\n### In Development\n\n- **IL Generator** - Intermediate language for optimization and portability\n- **Code Generator** - 6502 instruction selection and register allocation\n- **Assembler Integration** - PRG file generation\n\n### Planned\n\n- Standard library (VIC-II, SID, CIA wrappers)\n- Additional examples and documentation\n- Performance optimization passes\n\n## Development\n\nThis project uses TypeScript and is organized as a monorepo with Yarn workspaces.\n\n```bash\n# Install dependencies\nyarn install\n\n# Build all packages\nyarn build\n\n# Run tests\nyarn test\n\n# Clean build artifacts\nyarn clean\n\n# Build, clean, and test (full validation)\nyarn clean \u0026\u0026 yarn build \u0026\u0026 yarn test\n```\n\n**Requirements:**\n\n- Node.js \u003e= 22.0.0\n- Yarn 1.x (\u003c 2.0.0)\n\n## Project Structure\n\n```\nblend65/\n├── packages/\n│   └── compiler/          # Main compiler package\n│       └── src/\n│           ├── lexer/     # Tokenization\n│           ├── parser/    # Syntax parsing\n│           ├── ast/       # AST nodes and utilities\n│           ├── semantic/  # Type checking and analysis\n│           └── target/    # Code generation (WIP)\n├── docs/\n│   └── language-specification/  # Complete language spec\n├── examples/              # Example Blend65 programs\n└── plans/                 # Development roadmap\n```\n\n## Documentation\n\n- [Language Specification](docs/language-specification/README.md) - Complete syntax and semantics reference\n- [Compiler Master Plan](plans/COMPILER-MASTER-PLAN.md) - Implementation roadmap and status\n\n## License\n\n\u003e **📜 Elastic License 2.0 (ELv2)**\n\u003e\n\u003e This software is licensed under the Elastic License 2.0. You are free to use it to create\n\u003e games and software, but you cannot sell the compiler itself or offer it as a service.\n\u003e See [LICENSE](LICENSE) for full details.\n\n| Use Case | Allowed |\n|----------|---------|\n| Create open-source games/software | ✅ Yes |\n| Create commercial games/software | ✅ Yes |\n| Modify Blend65 for your own use | ✅ Yes |\n| Contribute improvements back | ✅ Yes |\n| Sell Blend65 as a product | ❌ No |\n| Include Blend65 in a commercial tool | ❌ No |\n| Offer Blend65 as a hosted service | ❌ No |\n| Fork to create competing compiler | ❌ No |\n\n## Contributing\n\nThe project is under active development. See the [master plan](plans/COMPILER-MASTER-PLAN.md) for current priorities and the implementation roadmap.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblendsdk%2Fblend65","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblendsdk%2Fblend65","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblendsdk%2Fblend65/lists"}