SSC is getting better

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Post Reply
undisbeliever
Rookie
Posts: 35
Joined: Sat Aug 21, 2004 2:31 am
Location: is an eight lettered word

SSC is getting better

Post by undisbeliever »

I have created a prototype of SSC (SNES Small C), it is limited, but supports more functions then SNESC.

One such which is the use of the SNES Hardware registers.

ie typing $2100 = brightness will load the value brightness and store it in the brightness register.

It is at http://snescentral.edgeemu.com/snesrpg/?main=files .
You just type in the C code and it will output assembly to stdout.
Last edited by undisbeliever on Tue Oct 18, 2005 4:26 am, edited 1 time in total.
whicker
Trooper
Posts: 479
Joined: Sat Nov 27, 2004 4:33 am

Post by whicker »

hmm.

normally, to keep in line with embedded C conventions, you'd declare a memory mapped variable:

Code: Select all

unsigned char brightness at 0x002100;
...
brightness = 15;
blah, but if it works, it works.
undisbeliever
Rookie
Posts: 35
Joined: Sat Aug 21, 2004 2:31 am
Location: is an eight lettered word

Post by undisbeliever »

The origional idea is that it is LIKE a C Compiler, but in fact it is a simple tool to help newbies become more interested in SNES programming.

That is why everything is static, why structions are obmitted and why I added the $2100 thing in the first place.

To clarify this delemma:
The following code is simple

Code: Select all

$2100 = brightness;
$$2120 = location; //(I think)
Will extract to:

Code: Select all

LDA brightness;
SEP #$20;
STA $2100;
REP #$20;
LDA location;
STA $2100;
If you really wanted to use 'brightness = 15;' then you can use #define brightness $2100
Post Reply