Jump to content



Sheddy's Photo

Sheddy

Member Since 21 Mar 2002
OFFLINE Last Active Yesterday, 8:38 AM

Posts I've Made

In Topic: Compressed samples..

Sun Mar 4, 2012 7:57 AM

How do things fare with DLIs going on? - The incredibly frustrating NMI hardware bug ( http://www.atariage....interrupt%20nmi) meant I decided to use combined channels for precise IRQ timing to try avoid the darn NMIs 99.99% of the time in the end.
If the RLE can be combined more efficiently with 16-bit timer as well... :thumbsup:
Edit: I've assumed your using 64Hz mode though. If all sound was done in 15.??Hz mode that wouldn't be a problem...?

In Topic: Interesting

Wed Feb 29, 2012 1:01 PM

View Postandym00, on Wed Feb 29, 2012 4:01 AM, said:

Ah, the PWM thing was in reference to some effects that can be used to push the type of sounds beyond plain square waves.. It's simply play this all back as plain 4bit samples at 15.6KHz, although with the interrupts reduced enormously, but still leaving that 15.6KHz timing precision for when it's actually needed..
This isn't playing back using any PWM methods for the sample data itself.. An earlier version did use Phaerons DAC method which had PWM as part of its design, but I stopped using that because a) it eats the entire POKEY resources b) I couldn't see how I could control the rate as simply, although I didn't put much effort into understanding what he'd done to the poor POKEY to get that method working.. The desire for it to be usable over a 4bit DAC, hence a lot of other machines being able to use this, thankfully kept me from pursuing that avenue :)

Ah, that'll teach me to skim. That must be a neat trick being able to reduce the interrupts that much without too much overhead - Will be checking it out in more detail later. Thanks :)

View PostBryan, on Wed Feb 29, 2012 9:28 AM, said:

View PostSheddy, on Wed Feb 29, 2012 3:34 AM, said:

Wow! This is giving amazing results. Excellent stuff Andy. Still not really understanding PWM though. Hard to believe so few IRQs are needed.

Anyone want to have a go at explaining in fairly simple terms? (looked at Wikipedia a while back and thought. Er, what?!) Not looked at the code either yet.

An explanation of PWM? It works like this:

When a frequency is too high to pass through a circuit (such as a low-pass filter), what you get is the average level instead of the rapid changes in level. Of course, unless your filter is perfect, you'll get some of the original frequency, but it collapses to the average level as the filter improves or the frequency goes up. So, this means we can make a DAC using just a square wave and a filter. If the square wave oscillates between 0V and 5V with a 50/50 duty cycle, we get 2.5V out of the filter/averager. If we change to a 25% low/75% high square, we'll get 3.75V out. And if we flip that wave (75% low/25% high), we'll get 1.25V out. So, it's the width of your pulse that determines voltage, and you can make various analog levels using a single digital output.

Thanks for the explanation Bryan :thumbsup: Kinda good to know I was only partially confused (although, as they say, "a little knowledge is a dangerous thing" ;) )

In Topic: Interesting

Wed Feb 29, 2012 3:34 AM

Wow! This is giving amazing results. Excellent stuff Andy. Still not really understanding PWM though. Hard to believe so few IRQs are needed.

Anyone want to have a go at explaining in fairly simple terms? (looked at Wikipedia a while back and thought. Er, what?!) Not looked at the code either yet.

Please correct as necessary! There is a very high frequency tone played, that is too high to hear. At very specific points in time the tone is stopped for a very short time, reducing the average volume for that part of the waveform? Ear only hears average volume.
So, if the frequency is so high, how can you make sure what the exact volume at any point in the wave is if you only have control at wavelength resolution? is it enough just to be on or off?
Thanks!

In Topic: Assembly Language Programming - Lesson 7 - State Machines

Sun Jan 8, 2012 7:10 AM

:thumbsup:

In Topic: Callisto

Sat Nov 5, 2011 12:49 PM

:thumbsup: Very slick work, Jason. Great use of colour. I too would love to see power-ups and more bullet hell going on, but I'm guessing there is still more to come ;-)