/CSharp-80

C# AOT compiler for Z80 based computers including the TRS-80 and ZX Spectrum

Primary LanguageC#GNU General Public License v3.0GPL-3.0

Build Status

This repo contains a .NET ahead of time compiler targetting the Z80 8-bit microprocessor. The compiler converts managed .NET applications into assembly language which is subsequently assembled using the zmac assembler. To learn more about CSharp-80, see the intro document and read the blog

Try out the samples applications here

Credits

Goals

  • Idea is to support minimal subset of C# with tiny runtime system and target Z80 processor
  • Runtime support for a number of computers including
    • TRS-80 Model I/III
    • ZX Spectrum
    • CPM
  • Compile the C# Snake game with minimal modifications
  • Have a range of sample applications for classic 8-bit computer programs
  • Learn more about AOT and the C# runtime

Current Status

  • Compiles a number of sample programs including Snake, Life, Towers of Hanoi, Hunt the Wumpus.
  • Bespoke graphics for the TRS-80
  • Performance is okay - snake is quite playable. Lots of scope for improvement here
  • Allocation on both stack and heap is supported
  • No Garbage collection
  • Lots of IL opcodes not implemented yet
  • Platform support is limited for ZX Spectrum and CPM but text based samples should work fine