Page 1 of 2

A musical treat!

Posted: Sun Aug 14, 2011 11:20 am
by sixxie
http://www.6809.org.uk/tmp/musical/

Check the README for details...

Re: A musical treat!

Posted: Sun Aug 14, 2011 7:55 pm
by jmk
Nice! A very popular demo these days. ;)

Maybe we should all use text mode more often for colourfulness...

Re: A musical treat!

Posted: Sun Aug 14, 2011 10:01 pm
by sixxie
Indeed! This is Semigraphics 12 (SG4 vertically divided by 6 for each character). Sadly, no SG4 mode divided by 3, that would have been ideal and required less memory!

If you look very close, you might spot a little space saving trick...

Re: A musical treat!

Posted: Sun Aug 14, 2011 11:56 pm
by prime
Perhaps I'm just being dumb.....

But why is it so big, I mean the graphics are not that complicated and neiter is the music, or is it sampled and that's what takes up the space ?

Cheers.

Phill.

Re: A musical treat!

Posted: Mon Aug 15, 2011 7:29 am
by sixxie
The graphics aren't complicated, but to get the right pixel shape (with the colour, of course), I needed to use Semigraphics 12 - that's 12 frames at 3K per frame = 36K (though as I say, there's a slight trick - all the frames actually fit into 30.5K).

If only there were a SAM/VDG combo that divided SG4 into an SG6 pixel layout (but with the colour), that would have taken a lot less memory.

One of the channels is played with a sample, but that sample's only 3K.

Re: A musical treat!

Posted: Mon Aug 15, 2011 10:00 am
by snarkhunter
Given the system specs this runs under, it is just great! Thanks very much for sharing. The music sounds really nice, too... I wasn't expecting any such thing from the old Dragon hardware.

Congratulations!

Re: A musical treat!

Posted: Tue Aug 16, 2011 8:31 pm
by rolfmichelsen
Great stuff! It would be interesting to learn how much of the CPU capacity you spend on this demo. The code gives me a headache, though. I'm too old to read self-modifying code these days :-)

-- Rolf

Re: A musical treat!

Posted: Tue Aug 16, 2011 11:51 pm
by sixxie
All of it! The mixer is running constantly, the only breaks being to feed it new notes, and flick the animation page.

The self-modification here isn't too hairy, it's just setting some values to load or add, not changing any op-codes.

In case anyone wonders, there's a source tarball up now, here: http://www.6809.org.uk/dragon/demo/. As it stands, it kinda needs my Perl assembler to build (as well as a few other bits), but shouldn't be too hard to adapt to others.

Re: A musical treat!

Posted: Wed Aug 17, 2011 7:47 pm
by rolfmichelsen
Ah! I kind of thought so. The Dragon supports lots of interesting features that could be really interesting if only the CPU was a tiny bit faster...

-- Rolf

Re: A musical treat!

Posted: Wed Aug 17, 2011 8:35 pm
by rolfmichelsen
sixxie wrote:As it stands, it kinda needs my Perl assembler to build
Since you obviously spend some time calculating and counting CPU cycles in your code, have you ever considered generating and outputting this information automatically from your perl assembler? That would be really useful :-)

-- Rolf