22 #ifndef FREESCAPE_ECLIPSE_C64_MUSIC_H 23 #define FREESCAPE_ECLIPSE_C64_MUSIC_H 25 #include "audio/sid.h" 26 #include "common/array.h" 37 bool isPlaying()
const;
42 static const uint16 kLoadAddress = 0x0410;
43 static const uint16 kOrderPointerTable = 0x1041;
44 static const uint16 kInstrumentTable = 0x1047;
45 static const uint16 kPatternPointerLowTable = 0x10A7;
46 static const uint16 kPatternPointerHighTable = 0x10C6;
47 static const uint16 kFrequencyHighTable = 0x0F5F;
48 static const uint16 kFrequencyLowTable = 0x0FBE;
49 static const uint16 kArpeggioIntervalTable = 0x148B;
51 static const byte kChannelCount = 3;
52 static const byte kInstrumentCount = 12;
53 static const byte kPatternCount = 31;
54 static const byte kMaxNote = 94;
63 byte instrumentOffset;
79 byte arpeggioSequencePos;
80 byte arpeggioSequence[9];
81 byte arpeggioSequenceLen;
88 byte pulseWidthDirection;
102 byte _arpeggioIntervals[8];
106 ChannelState _channels[kChannelCount];
108 byte readByte(uint16 address)
const;
109 uint16 readWordLE(uint16 address)
const;
110 uint16 readPatternPointer(byte index)
const;
111 byte readInstrumentByte(byte instrumentOffset, byte field)
const;
112 byte readPatternByte(
int channel);
113 byte clampNote(byte note)
const;
115 void sidWrite(
int reg, byte data);
119 void loadNextPattern(
int channel);
120 void buildEffectArpeggio(
int channel);
121 void loadCurrentFrequency(
int channel);
122 void finalizeChannel(
int channel);
123 void processChannel(
int channel,
bool newBeat);
124 void parseCommands(
int channel);
125 void applyNote(
int channel, byte note);
126 void applyFrameEffects(
int channel);
127 bool applyInstrumentVibrato(
int channel);
128 void applyEffectArpeggio(
int channel);
129 void applyTimedSlide(
int channel);
130 void applyPulseWidthModulation(
int channel);
Definition: c64.music.h:30