SNES C compiler, without all the work

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
SNES C compiler, without all the work
by on (#115925)
It looks like Western Design Center is re-releasing their 65816 C compiler, and they've reduced the price to $40:

http://65xx.com/65xx-store-2/65xxtools/

That sounds a bit expensive; but from what I remember reading, this is based on the Zardoz compiler: http://web.archive.org/web/199707201247 ... /cdev.html which was used to code for the SNES.

I played around with the free version they released several years ago, and it also has a really good optimizer and is easier than the SNES C compiler to use.

They've pulled it down to fix something. WDC stated in an e-mail that they expect it to be back up by next week.
Re: SNES C compiler, without all the work
by on (#115926)
Do they use a software stack for auto variables using lda (),Y addressing ? If yes, then I won't care.

ALSO :
Quote:
The 65xxTools is NOT for resale or reverse engineering of our technology in any form and is NOT provided for development of commercial products that use non–WDC 65xx processors in Core or Chip form.
Re: SNES C compiler, without all the work
by on (#115927)
Bregalad wrote:
ALSO :
Quote:
The 65xxTools is NOT for resale or reverse engineering of our technology in any form and is NOT provided for development of commercial products that use non–WDC 65xx processors in Core or Chip form.


According to the Ricoh 5A22 wiki page, it's based on the GTE version of the WDC65186:
http://en.wikipedia.org/wiki/Ricoh_5A22

And, the GTE version was second sourced from WDC:
http://en.wikipedia.org/wiki/WDC_65816/65802

I would think that counts as a WDC 65xx core.
Re: SNES C compiler, without all the work
by on (#115934)
Bregalad wrote:
Do they use a software stack for auto variables using lda (),Y addressing ?

I don't know. But what I do know is that that's a workaround for 6502 limits and not quite as necessary on the 65816 for two reasons. For one thing, zero-page instructions are no longer hardcoded to $000000-$0000FF; instead, they're indexed from the D register, which can be used as a frame pointer like x86 BP. For another, two of the zero-page addressing modes d and (d),Y have variants that index from the stack pointer S instead of D: d,S and (d,S),Y.
Re: SNES C compiler, without all the work
by on (#115935)
Bregalad wrote:
Do they use a software stack for auto variables using lda (),Y addressing ? If yes, then I won't care.


From the Zardoz page:

Uses direct page as stack frame making all automatic variables and arguments pseudo-registers.

Zardoz supposedly was used to develop games for the SNES; which is what the WDC compiler and linker are based on.
Re: SNES C compiler, without all the work
by on (#115966)
cdoty wrote:
It looks like Western Design Center is re-releasing their 65816 C compiler, and they've reduced the price to $40:
That sounds a bit expensive;


$40 may or may not provide value, depending on the merits of the product itself (how useful it is).

it also depends on how one values his or her time... what do you pay yourself per hour, what do you want to get done, what do you want to focus on, what is your tolerance level for reinventing everything?

Would the compiler be useful only for new projects? Or would compiled code (or an intermediate file) be able to be easily inserted into existing code for things like patches, romhacks, and translations? Does the compiler support assembly code for sections that really have to be?

Things like this determine the value of a product if it's going to be for sale.
Re: SNES C compiler, without all the work
by on (#115967)
$40 is cheap. The question is how it compares to existing free tools (tcc-816, snesc), code efficiency-wise. I somehow think it is not very effective, maybe about the same, just because it is old.