drcjt / CSharp-80

C# AOT compiler for Z80 based computers including the TRS-80 and ZX Spectrum
https://drcjt.github.io/CSharp-80/
GNU General Public License v3.0
51 stars 3 forks source link

Build Status

This repo contains a .NET ahead of time compiler targetting the Z80 8-bit microprocessor. The compiler converts managed .NET assemblies into Z80 assembly language which is subsequently assembled using the zmac assembler. To learn more about CSharp-80, see the intro document. Currently there is support for the Trs-80, ZX Spectrum and CPM platforms.

How to use

Try out the sample applications here:

Currently the easiest way to use the compiler is to clone the repo, load the solution in Visual Studio, build, and then alter the code in one of the samples like Hello World. Rebuild and then you can see the z80 assembly in the Hello.lst file, look in Samples/Hello/bin/Trs80/Debug/net7.0. Note that by default the solution targets the TRS-80 platform and so you'll also get a Hello.cmd file which is the binary file you can then use with either a real TRS-80 or an emulator.

Note that the csproj files for the samples contain some specific configuration settings to disable the normal .NET SDK libs. The samples reference the System.Private.CoreLib project which is a cut down version of the normal .NET SDK libs.

Credits

Goals

Current Status