Open nesbox opened 6 years ago
Looks like it's no longer maintained? :cry:
Lots of fresh commits in repo: https://repo.or.cz/w/tinycc.git. Even if Fabrice Bellard himself it no longer working on a project - it's opensource and there are a lot of contributors there.
Ok, let's give it a try :)
You mean as a language you could use to write cartridges? That would be cool, but...
tcc generates x86 code.
Do you have some idea how this would work? We support running languages in a variety of VMs (Lua, Wren, JS)... so we need something that includes it's own VM or runtime, not native x86 code.
https://github.com/jpoirier/picoc (a C interpreter) looks like it might be more up-to-speed, but also seems quite old with no activity?
Or C/C++ via WASM, ie #1259. This should be doable as soon as I push my PR. Though the workflow might be a bit more complex than if it was "built in" in the same way the other interpreters are.
I wanted to use TCC as a compiler for TIC code, not to write carts :)
I have to agree with nesbox here. Writing a TIC-80 cart in C when you could chose Lua or Wren seems insane :upside_down_face:
Well, C isn't the language I'd pick either, just it happens to be an easy target to support for WASM - so someone who is a super pro with C might feel differently... :-)
Ah, I understand the motivation now haha
I think porting games from other platforms written in C might be one reason someone would be interested. I could take my Arduboy Remastered work for WASM-4 and now drop it right into TIC-80 with very little effort because of the ability to compile C and have everything "just work".
@nesbox isn't this already supported per https://github.com/nesbox/TIC-80/tree/main/templates/c?
Compiled to WASM, yes.
ah but I guess you want to be able to write C within TIC-80.
https://bellard.org/tcc/