Re: [stella] 2600 Sound, that time of year..

Subject: Re: [stella] 2600 Sound, that time of year..
From: "Paul Slocum" <paul-stella@xxxxxxxxxxxxxx>
Date: Fri, 01 Aug 2003 15:50:27 -0500

RAM - It eats the entire zeropage except for 5 bytes at the moment, but
that's because I've put the code in there to save about 15-20 cycles.. It's
one giant self modifying animal, but can be made to run from ROM, with a 3
channel piece eating about 45 bytes of RAM.. There's a lot to remember ;)
But only while its playing.. And of course this drops linearly with the
number of voices.. So a 2 voice tune could eat as little as 30 bytes ram
potentially..

That's pretty steep, but again, for a title screen it'd be no problem. Maybe a 2 voice PWM setup could be combined with a standard music driver like mine running the other voice. I assume doing 2 voices also reduces the number of cycles required in the kernal, which would help.


ROM - The current player eats about 900 bytes of ROM, but that's *very* lazy
there's a lot of wasted space, but then there's obviously the amount of
memory for your tunes, which I've tried to make quite compact... Could
probably easily fit into 512 bytes or so..

Maybe you could aim for reducing the number of cycles and RAM at the expense of ROM. ROM is much easier to come by.


Instead of using an event data style, my own music driver just uses patterns and a pattern list that specify the pitch, sound type, and volume of both oscillators for every tick in the song. So there's no duration data. This makes the driver very simple and efficient with RAM. It's a bit less efficient as far as ROM space, but I can still fit the driver and a complex 3-4 minute song in 2k. Maybe switching to a music data representation like that would save some RAM and cycles?

-Paul


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


Current Thread