sgdk
psg.h
Go to the documentation of this file.
00001 
00010 #ifndef _PSG_H_
00011 #define _PSG_H_
00012 
00017 #define PSG_PORT            0xC00011
00018 
00023 #define PSG_ENVELOPE_MIN    15
00024 
00028 #define PSG_ENVELOPE_MAX    0
00029 
00034 #define PSG_NOISE_TYPE_PERIODIC 0
00035 
00039 #define PSG_NOISE_TYPE_WHITE    1
00040 
00045 #define PSG_NOISE_FREQ_CLOCK2   0
00046 
00050 #define PSG_NOISE_FREQ_CLOCK4   1
00051 
00055 #define PSG_NOISE_FREQ_CLOCK8   2
00056 
00060 #define PSG_NOISE_FREQ_TONE3    3
00061 
00062 
00066 #define PSG_init()  _Pragma("GCC error \"This method is deprecated, use PSG_reset() instead.\"")
00067 
00072 void PSG_reset(void);
00073 
00084 void PSG_write(u8 data);
00085 
00097 void PSG_setEnvelope(u8 channel, u8 value);
00109 void PSG_setTone(u8 channel, u16 value);
00121 void PSG_setToneLow(u8 channel, u8 value);
00134 void PSG_setFrequency(u8 channel, u16 value);
00150 void PSG_setNoise(u8 type, u8 frequency);
00151 
00152 
00153 #endif // _PSG_H_
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines