Hacker News new | past | comments | ask | show | jobs | submit login

Noticed this on the Github page:

   We need a 'proper' 65C816 C compiler
Aren't there any?



There isn't a good open source one, no.

The WDC has a compiler, but it's a bit dated, and windows only. There is also the 'Calypsi' C compiler which is free for hobbyist use, but also is not open source: https://www.calypsi.cc.

There are also ports of tcc and lcc, but from what I remember, there are some bugs in the code generation. cc65 is 6502-only, as is the mos-llvm project.

The 65C816 isn't exactly the easiest CPU to write a C compiler for.


I wrote a 65C816 assembler back in day, together with a friend who had Super Famicom. I remember looking at some of the hand-written code from the demos and thinking well, hm, this code would be tricky to generate...


I was trying a couple of months ago to write a pascal compiler for the '816. Just trying to come up with a decent strategy for code generation was a massive pain in the neck.


Someone needs to write that "65C816 Register Allocation and Instruction Selection" book. On the flip side, I am working on an ARM64 codegen and I pretty much have only myself to blame for the lack of progress...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: