Re: [stella] Dumb newbee question

Subject: Re: [stella] Dumb newbee question
From: Adam Wozniak <adam@xxxxxxxxxxxxxxxx>
Date: Wed, 20 Mar 2002 00:18:19 -0800 (PST)
On Tue, 19 Mar 2002, Greg Miller wrote:
> Adam Wozniak wrote:
> 
> > Assuming I've set up my compiler properly, should this work?
> > 
> > #include "tia.h"
> > #include "riot.h"
> > 
> > void main(void)
> > {
> 
> The return type of "main" in C is "int".

*grin*

> >    // turn that damn noise off
> >    AUDV0 = 0;
> >    AUDV1 = 0;
> 
> What are AUDV0 and AUDV1 with this compiler? If they're pointers, you'll 
> need to dereference them (e.g., "*AUDV0=0;").

They're not pointers, they're declared unsigned char, and I've forced
the compiler to put them in the right spot.

> >    while (1)
> 
> [snipped kernel loop]

Ack!  the part you snipped is the part I wasn't sure about.

> What compiler package are you using (I've not looked at any attempts to 
> produce a C compiler for the 2600) and how are you planning on 
> controlling the timings of compiler-generated code?

cc65 (www.cc65.org) is a free compiler for the 6502

The rest is just magic with a hand written crt0.S and the linker config file.

I'm mostly interested in knowing if the "kernel loop" there was correct.

I don't have a plan (yet) for controlling timing.  I figured I'd think about
that once the compiler was working.  I realize that most of the cool tricks
are intimately tied to cycle counting, but part of the exercise is to see
what is (and isn't) possible with this toolset.

--Adam
-- 
adam@xxxxxxxxxxxxxxxx        http://cuddlepuddle.org/~adam/pgp.txt

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread