Getting LCC to work
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
Getting LCC to work
I downloaded the LCC-65C816 compiler from 6502.org and followed the instructions, but I can only build 2 of the 3 executables that are supposed to be made (there is no makefiles in the GEN0 folder...)
Is there an example of how to write a simple SNES application in C ?
I don't want to learn 65C816 assembly...
Is there an example of how to write a simple SNES application in C ?
I don't want to learn 65C816 assembly...
Re: Getting LCC to work
Two 65816 C compilers that were proven to work for SNES projects are SNESC (old, not really C) and tcc816 from the snes-sdk (full of bugs, but usable). I haven't seen that anyone used LCC-65C816 yet, never heard of it even.
Learning 65816 assembly when you know 6502 assembly is super easy. It may seem a bit scary and different at start, but it fact it is the same thing, with just a few minor additions.
Learning 65816 assembly when you know 6502 assembly is super easy. It may seem a bit scary and different at start, but it fact it is the same thing, with just a few minor additions.
Re: Getting LCC to work
Just for reference the LCC I was talking about is from here.
I should have mixed this up with TCC then (they are very similar names).
I should have mixed this up with TCC then (they are very similar names).
Re: Getting LCC to work
Hmm, so it is the third C compiler for 65816 around, a LCC version retargetted by Morita himself even. The TCC816 is completely different thing, it is retargetted TCC hooked up to the WLA DX.
Please let us know it you'll be able to use it successfully, it is very interesting how well it works. TCC816 really makes me want to find a better alternative, but I don't have time currently to mess around with this one.
Please let us know it you'll be able to use it successfully, it is very interesting how well it works. TCC816 really makes me want to find a better alternative, but I don't have time currently to mess around with this one.
Re: Getting LCC to work
Well, as my initial post states, I have not ^^Please let us know it you'll be able to use it successfully, it is very interesting how well it works.
However I could ask for advice on 6502.org, as someone there probably already used it.
Is he famous or something ?a LCC version retargetted by Morita himself even
Yeah it's more the amount of involvement to maintain a project in assembly which is super scary.Learning 65816 assembly when you know 6502 assembly is super easy. It may seem a bit scary and different at start, but it fact it is the same thing, with just a few minor additions.
Re: Getting LCC to work
Yes he is. He spends a lot of time with compilers and tools but has written games as well. In 1993 I had the pleasure of spending an entire day with him at Apple Expo West and part of the evening at a post-Expo get-together in Berkeley.Bregalad wrote:[Is he famous or something ?a LCC version retargetted by Morita himself even
Re: Getting LCC to work
You can also try that : http://www.portabledev.com/wiki/doku.php (PVSnesLib)Bregalad wrote:Is there an example of how to write a simple SNES application in C ?
I don't want to learn 65C816 assembly...
It has full examples to begin some SNES things in C.
And if you want to help to improve the lib, you're welcome \o/ (like everyone in this forum)
Re: Getting LCC to work
Looks exactly what I was looking for ^^You can also try that : http://www.portabledev.com/wiki/doku.php (PVSnesLib)
A tutorial without too much headache.
Thank you very much.
Re: Getting LCC to work
I didn't know about the LCC port. Would be interesting to compare the generated code to the one tcc-816 outputs.
Re: Getting LCC to work
But for that you should first be able to build LCC......
Re: Getting LCC to work
Done.But for that you should first be able to build LCC......
Running make in etc/ builds lcc. Running make in gen0/ builds rcc. dag2gs2 can be built by just running gcc -o dag2gs2 dag2gs2.c in gen0/.
Re: Getting LCC to work
Unfortunately it appears to be useless. The compiler fails to compile even this simple program:
And for the things it does manage to compile it generates poor code.
Code: Select all
void main(void)
{
int a = 0, i;
short *p;
for (i=0; i<256; i++)
p[i] = i; // *p++ = i; works though
}