11 March 2016 - Forum Rules
Started by Disch, March 10, 2014, 10:46:35 PM
SCORE DATA:==================================00-B3 are tonesB4-C2 is sustainC3-D1 is rest.For all of the above, value%15 is the length of the note (run through a lut to get length in clocks)For tones, the note (C, C#, D, etc) is determined by value/15. Where 0=C, 1=C#, 2=D, 3=D#, etcOther values are 'commands' as illustrated below.D2 aa = write aa to FC01+X Set volume to 'aa' zero FC00+X disable/stop vol fading zero FC80+XD3 aa bb = fade to volume 'bb' over 'aa' updates 'bb' is the target volume 'aa' is time delay (higher values = slower fade) D4 aa = write aa to FC41+X Set Pan to 'aa' zero FC40+X disable/stop pan fading zero FC81+XD5 aa bb = fade to pan 'bb' over 'aa' updates 'bb' is the target pan 'aa' is time delay (higher values = slower fade)D6 aa bb = write aa+1 to FCC1+X ??? write bb to 0120+X ??? not sure what this does. causes some kind of eventual update to FD80,1+XD7 aa bb cc = write aa to 0160+X depth? write bb+1 to FCA0+X set vibrato counter reload value to bb+1 write 1 to FCE0+X set vibrato counter to 1 so it updates immediately write cc to 0121+X set vibrato enable/phase selection Enable/disable vibrato and set phase/rate (but not depth? Unless 0160 is depth?) aa = ?vib depth? bb = rate (00 = fastest, FF = slowest) cc = enable/phase selectionD8 = disable vibrato (by writing 0 to 0121+X)D9 aa bb cc = write aa to 0161+X depth? write bb+1 to FCA1+X set tremolo counter reload value to bb+1 write 1 to FCE1+X set tremolo counter to 1 so it updates immediately write cc to 0140+X set tremolo enable/phase selection same as D7, but tremolo instead of vibratoDA = disable tremolo by writing 0 to 0140+XDB aa bb = ??? $0763 complex. Uses a lot of things I don't have ID'd yet: FCC0, FD00, FDA0, FDA1, 0141, FDE0, FDE1DC = ??? $07B4 Zero's 0141, FDE0, FDE1DD aa = Sets noise freq to aa & 0x1F. Does not enable/disable noise for this channel, it's just a pitch changeDE = Enable noise for this channelDF = Disable noise for this channelE0 = Enable Mod for this channelE1 = Disable Mod for this channelE2 = Enable Echo for this channel E3 = Disable Echo for this channelE4 aa = Set octaveE5 = Increment octaveE6 = Decrement octaveE7 aa = Set current key change value to 'aa' (00 = normal key, 01 = C becomes C#, 02 = C becomes D, etc)E8 aa = Modify current key change value by 'aa' ('aa' is added to current key change)E9 aa = ??? $09B0 --- sets FD40+X and exits. Not sure what that var is for. Used in pitch calculations. EA aa = write aa to 5D+X = current instrument as written to reg.. and does a few other things: copy 16 bit ptr from 1800+aa -> FD20+X ( ??? ) copy 16 bit ptr from 1880+aa -> FE80+X (resets ADSR data to instrument defaults) EB aa = Sets attack rate to 'aa' & 0x0F FE80+X = FE80+X & 0x70 | ('aa' & 0x0F) | 0x80EC aa = Sets decay rate to 'aa' & 0x07ED aa = Sets the sustain level to 'aa' & 0x07EE aa = Sets the sustain rate to 'aa & 0x1FEF = Reset ADSR values to instrument defaultsF0 aa = ??? $0944: increments 5C+X, then does a bunch of other crap no idea what it's doing ???F1 = ??? $096B: decrements 5C+X, then other stuff. No idea ???F2 = $09BC ??? -- kills return address from stack and does a lot of heavy calls. End music/sfx maybe?F3 aa = $0620 ??? -- if sfx, this is a NOP for music: $7D = 'aa' $7C = 0 $80 = 0F4 aa bb = $062D ??? no freaking idea. Uses 80,81,82. Fairly complexF5 aa = $06B3 - NOP (goes right to RET), 'aa' is unusedF6 aa bb = $06B0 - NOP. 'aa' and 'bb' are unusedF7 aa bb = $0733 - NOP. 'aa' and 'bb' are unusedF8 aa = Sets music master volume (FF = normal, 00 = silent). Does not apply to 'special' instrument see $00AC variable description (all this command does is assign that var)F9 aa bb cc = $0917 - NOP for sfx. For music, a conditional jump. 'aa' is a loop counter, and 'ccbb' forms the address (add 6,7 to it just like with the FA command) The thing that's weird is that it's backwards. You only jump WHEN the loop counter reaches the given value. I would expect it to jump UNTIL the loop counter reaches the value Also, the loop counter doesn't get reset by this command. See command FC.FA aa bb = $0905 NOP for sfx. For music... Standard jump. $0C,D+X = bbaa + $06,7 jump to bbaa + [$06,7]. Not sure what significance 6,7 is, but in the track it is fixed at $E233 ???FB aa bb = $0995 NOP for sfx. For music... conditional jump to bbaa + $06,7 jump only if the channel has its chan bitmask set in var $C4 Once jump is taken, that bit in C4 is cleared. Not sure if/how C4 can be set again. ???FC = $093A NOP for sfx. For music, zero out the loop counter.FD aa = $09B4 NOP for sfx. For music, sets special instrument ID (assigns $FF88). See $FF88 and $00AC description for detailsFE = $09BC - same as F2FF = $09BC - same as F2
Page created in 0.046 seconds with 20 queries.