Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Handle Note
- ;TODO - refactor part of this into a jump table? (effects?)
- cp $60 ; if byte < 0x60, it's a note
- jp c, .HandleNote
- cp $80 ; else if byte < 0x80, it's a wait instruction
- jp c, .HandleWait
- cp $A0 ; else if byte < 0xA0, it's a change instrument instruction
- jp c, .HandleInstrumentChange
- cp $B0 ; else if byte < 0xB0, it's a volume change
- jp c, .HandleVolumeChange
- cp $C0 ; else if byte < 0xC0, it's a duty change
- jp c, .HandleDutyChange
- cp $E0 ; else if byte < 0xE0, it's a tempo change
- jp c, .HandleTempoChange
- cp $F8
- jp z, .HandleDelayedNoteStart
- cp $F9
- jp z, .HandleDelayedNoteCut
- cp $FA
- jp z, .HandleFinePitch
- cp $FB
- jp z, .HandleVolumeEnvelope
- cp $FC
- jp z, .HandleNote
- cp $FD
- jp z, .HandleNote
- cp $FE
- jp z, .JumpToFrame
- cp $FF
- jp z, .GoToNextFrame
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement