;Ensoniq Mirage OS 3.2 data file for 6809dasm ;date 7/4/99 org 8000 label 0000 wavetable label 8008 irqvec label 800b midi_irq_vector label 800e osvec label 893c irqentry label B920 osentry label c000 expansion_port label e100 midi_control_status label e101 midi_data label e200 via_data_b label e201 via_data_a label e202 via_data_dir_b label e203 via_data_dir_a label e204 via_timer_1_counter_lsb label e205 via_timer_1_counter_msb label e206 via_timer_1_lsb_latch label e207 via_timer_1_msb_latch label e208 via_timer_2_counter_lsb label e209 via_timer_2_counter_msb label e20a via_shift_register label e20b via_aux_control label e20c via_peripheral_control label e20d via_interrupt_status label e20e via_interrupt_enable label e20f via_data_a_no_handshake label e408 filter_cutoff_1 label e409 filter_cutoff_2 label e40a filter_cutoff_3 label e40b filter_cutoff_4 label e40c filter_cutoff_5 label e40d filter_cutoff_6 label e40e filter_cutoff_7 label e40f filter_cutoff_8 label e410 filter_resonance_1 label e411 filter_resonance_2 label e412 filter_resonance_3 label e413 filter_resonance_4 label e414 filter_resonance_5 label e415 filter_resonance_6 label e416 filter_resonance_7 label e417 filter_resonance_8 label e418 multiplexer_address_preset_1 label e419 multiplexer_address_preset_2 label e41a multiplexer_address_preset_3 label e41b multiplexer_address_preset_4 label e41c multiplexer_address_preset_5 label e41d multiplexer_address_preset_6 label e41e multiplexer_address_preset_7 label e41f multiplexer_address_preset_8 label e420 multiplexer_address_end label e800 fd_command_or_status label e801 fd_track label e802 fd_sector label e803 fd_data label ec00 q_chip label ec7f q_chip_unknown label ece0 q_chip_osc_interrupt label ece1 q_chip_osc_enable label ece2 q_chip_ad_conversion label f000 fdcreadsector label f013 fdcskipsector label f024 fdcwritesector label f037 fdcfillsector label f04a fdcreadtrack label f058 fdcwritetrack label f066 fdcrestore label f06f fdcseektrack label f07d fdcseekin label f086 fdcseekout label f08f fdcforceinterrupt label f0a7 countdown label f0b0 nmivec label f0f0 coldstart label f146 runopsys label f15d hwsetup label f1bb qchipsetup label f1e5 clearram label f20d loadopsys label f2af readsysparams label f306 checkos label f33c showerrcode label f38c preparefd label f3ac loadossector label f3f1 gototrack label f413 seterrcode label f425 saveparams label f437 restoreparams label f448 readsector label f476 writesector label f4a4 gototrack2 label f4c6 enablefd label f4d6 disablefd label f4df timer2int label f514 float2integer label f52d init_playmode label f541 reset_6522_via label f55b copybytes label f564 swapbytes label f571 init_qchip label f5be init_adc label f5dc init_filter label f5e7 write_cutoff_and_res label f5f1 writewavedeltas label f6dd qchip_write_amp label f77d exponential_table label f7fd filter_table label f84d tri1_table label f8cd tri2_table label f94d float2int_table label fb68 keypad_translate_table label fb80 disk_tr_sect_tbl label fbd4 disk_dir_mask label fc7f resetvec label fc91 ospanic data 8000-8001 commentline 8000 Ensoniq Mirage OS 3.2 data 8002 label 8002 fd_unknown_1 data 8003 label 8003 fd_unknown_2 pointer 8004 commentline 8004 Address to load/save from label 8004 fd_address_start data 8006 label 8006 fd_status data 8007 label 8007 fd_error data 8011 commentline 8011 Start of configuration (dump table) commentline 8011 First byte is a dummy and must be 0, at least in MASOS label 8011 global_config data 8012 label 8012 master_tune data 8013 label 8013 pitch_bender_range data 8014 label 8014 velocity_sensitivity data 8015 label 8015 upper_lower_balance data 8016 label 8016 program_link_switch data 8017 label 8017 sample_time_adjust data 8018 label 8018 input_filter_freq data 8019 label 8019 mic_line_switch data 801a label 801a sampling_threshold data 801b label 801b multisample_switch data 801c label 801c midi_local data 801d label 801d lfo_modulator_source data 801e label 801e mix_modulator_source data 801f label 801f aftertouch_mod_depth data 8020 label 8020 midi_omni_mode data 8021 label 8021 midi_channel data 8022 label 8022 midi_thru_mode data 8023 label 8023 midi_controller_enable data 8024 label 8024 external_sequencer_clock data 8025 label 8025 external_clock_jack data 8026 label 8026 internal_clock_rate data 8027 label 8027 sequencer_loop_switch data 8028 label 8028 seq_foot_sus_pedal_switch data 8029 label 8029 unknown_param_11 data 802a label 802a unknown_param_12 data 802b label 802b software_version data 802c label 802c unknown_param_16 data 802d label 802d unknown_param_15 data 802e-802f data 8030 data 8031 label 8031 keypad_debounce_timer data 8032 commentline 8032 Timer for autorepeat when Up/Down buttons are held down label 8032 up_down_button_timer data 8033 commentline 8033 Flag bytes at $89, $8a select digits to blink label 8033 LED_blink_timer data 8034-8035 data 8036 commentline 8036 Counts number of internal clock pulses received. Decreased by handler. label 8036 sequencer_int_clock_count data 8037-804e label 804f buffer1 comment 804f stores upper bits of note number? data 804f-805d pointer 805e label 805e task_list_pointer data 8060-8064 commentline 8065 Current velocity in voice control data 8065 label 8065 velocity commentline 8066 Current key in voice control data 8066 label 8066 key commentline 8067 Current relative amplitude in voice control data 8067 label 8067 rel_amp data 8068-8075 label 8068 mod_wheel_value_keybd label 806b foot_pedal_status label 806c mod_wheel_value_b label 806f mod_wheel_value_midi data 8076 label 8076 mod_wheel_value_seq data 8077-8078 data 8079 commentline 8079 $00 = sustain off commentline 8079 $40 = sustain on label 8079 sustain_onoff data 807a label 807a lfo_modulation data 807b-8081 data 8082 commentline 8082 0: Initial state, waiting for input commentline 8082 1: Number key pressed, waiting for second digit commentline 8082 2: Waiting for number in range 1-3 commentline 8082 3: Waiting for number in range 1-9 commentline 8082 4: Waiting for Enter/Start button press commentline 8082 5: Program button pressed label 8082 ui_keypad_state data 8083 commentline 8083 00000000 => Show dot on left side commentline 8083 1xxxxxxx => No dots commentline 8083 else Show dot between digits label 8083 ui_dot_state data 8084 commentline 8084 00000000 => Display commentline 8084 1xxxxxxx => Decrease commentline 8084 else Increase label 8084 parameter_operation data 8085 commentline 8085 0: Initial state, waiting for input commentline 8085 1: Load sound commentline 8085 2: Save sound commentline 8085 3: Sample commentline 8085 4: Sequencer play or record commentline 8085 5: Sequencer load commentline 8085 6: Sequencer save commentline 8085 7: Sequencer save long sequence commentline 8085 8: Change program commentline 8085 9: Save configuration parameters label 8085 ui_pending_operation data 8086 data 8087 commentline 8087 Reload value for Up/Down typomatic timer ($32) label 8087 button_timer_reload data 8088 commentline 8088 Keycode temp storage for Up/Down typomatic code label 8088 typomatic_temp data 8089 commentline 8089 Flash right LED digit if nonzero label 8089 flash_led_right data 808a commentline 808a Flash left LED digit if nonzero label 808a flash_led_left data 808b label 808b param_to_display data 808c commentline 808c Number of sound or seq to load/save label 808c sound_seq_number data 808d commentline 808d Stores first digit of two-digit parameter number label 808d first_param_digit data 808e commentline 808e Current program number for upper keyboard half label 808e upper_program_number data 808f commentline 808f Current program number for lower keyboard half label 808f lower_program_number data 8090 commentline 8090 Number of sound to load, zero-origin (key - 1) label 8090 sound_load_index data 8091 commentline 8091 0: load lower commentline 8091 1: load upper commentline 8091 2: load all label 8091 load_sound_flag data 8092 commentline 8092 0: save lower commentline 8092 1: save upper commentline 8092 2: save all label 8092 save_sound_flag data 8093-809c data 809d-809e commentline 809d Used by parameter-change code to save X reg data 809f commentline 809f Wavesample index? ld @ $9AE8, clr @ $9BB6 data 80a0 label 80a0 parameter_max_value data 80a1 label 80a1 parameter_min_value data 80a2 label 80a2 parameter_inc_dec_step data 80a3 commentline 80a3 [tjv] show value as zero-origin or one-origin? commentline 80a3 0xxxxxxx => Decimal commentline 80a3 1xxxxxxx => Hexadecimal label 80a3 parameter_how_to_display data 80a4 commentline 80a4 Upper/Lower flag for parameter editing commentline 80a4 0 = Lower, 1 = Upper label 80a4 upper_lower_flag data 80a5-80a6 commentline 80a5 Address of upper sound parameter block label 80a5 upper_param_block data 80a7-80a8 commentline 80a7 Address of lower sound parameter block label 80a7 lower_param_block data 80a9-80aa data 80ab commentline 80ab If this is not 00, the parameter is an on/off switch label 80ab parameter_on_off data 80ac commentline 80ac Param options from pt label 80ac parameter_address data 80ad commentline 80ad Save last keypad code during debouncing label 80ad debounce_keycode data 80ae commentline 80ae Current logical keypad code label 80ae logical_keycode data 80af commentline 80af Current physical keypad code label 80af physical_keycode data 80b0-80b2 commentline 80b0 Keypad/LED workspace data 80b3-80b4 commentline 80b3 Data to put on display label 80b3 display_data data 80b5-80b6 commentline 80b5 Shift buffer for LED display data data 80b7-80ba commentline 80bb keeps track of last status byte transmitted data 80bb label 80bb last_midi_status data 80bc-80bd label 80bc midi_buffer_trans_end pointer 80be label 80be midi_buffer_pointer pointer 80c0 commentline 80c0 Address of current MIDI byte handler label 80c0 midi_handler data 80c2 label 80c2 midi_temp_1 data 80c3 label 80c3 midi_temp_2 data 80c4 label 80c4 midi_temp_3 data 80c5 label 80c5 midi_input_byte pointer 80c6 label 80c6 midi_send_address data 80c8-80ce data 80cf label 80cf fd_operation_code data 80d0-80d6 data 80d7-80d8 label 80d7 fd_unknown_1_end data 80d9-80da data 80db-80dc label 80db fd_address_end data 80dd-80e0 commentline 80e1 00=load, 02=save data 80e1 label 80e1 fd_load_or_save data 80e2-80e3 data 80e4 label 80e4 sequencer_expansion_segment pointer 80e5 label 80e5 sequencer_expansion_address data 80e7 commentline 80e7 Keeps track of whether the sequencer is playing / loaded and possibly more commentline 80e7 Possible values seem to include 00, 02, 04, 06, 08, 0a label 80e7 sequencer_status data 80e8 label 80e8 sequencer_unknown_3 data 80e9 commentline 80e9 Counts number of external clock pulses received. Decreased by handler. label 80e9 sequencer_ext_clock_count data 80ea-80fb label 80fc lookuptable comment 80fc notice the binary form of these #'s! data 80fc-8103 data 8104-8224 data 8225-8234 commentline 8225 Ring buffer of 16 bytes. label 8225 midi_buffer data 8235 label 8235 midi_unknown_1 data 8236 label 8236 midi_unknown_2 data 8237 label 8237 midi_unknown_3 data 8238-8277 data 8278-8279 commentline 8278 Ptr to first free byte in list label 8278 vbutton_write_ptr data 827a-827b commentline 827a Ptr to first occupied byte in list label 827a vbutton_read_ptr data 827c-828b commentline 827c MIDI virtual button list label 827c vbutton_list label 828c vbutton_list_end comment 8290 Disable interrupts comment 829d Enable interrupts, return label 82ae hmm comment 82ae get note number? comment 82b0 adj. by 3 octs. comment 82b9 a=(b-36)/8,a=upp 3 bits of note numb comment 82ba b=low 3 bits of note numb comment 82bf b=peek(x+b) comment 82c1 b=b&peek(u+a) comment 82c3 b saved in (u+a) comment 82c3 poke(u+a),peek(u+a)&peek(x+b) comment 82c3 disable bit #b @u+a label 83ef check_8039 label 841b maybe_reload_values label 8432 reload_values label 8443 check_8104_0 label 8452 check_8104_1 label 845a check_8104_2 label 8460 set_to_128 label 857e rts_out1 label 8609 set_to_0 label 8738 check_8207 label 875e init_qchip_and_filters label 876b create_linked_list label 878d init_osc_ctrl_reg comment 87bc u = b26d at this point label 8844 write_osc_ctrl_reg label 87bf unknown2_note_off comment 87bf Called by note off label 87c4 unknown2_note_on comment 87c4 Called by note on label 87d8 unknown2_poly_mix_lfo_mod comment 87d8 Called by poly aftertouch label 87dd do_local_suspedalup comment 87dd Called by sustain label 87e2 unknown2_allnotesoff comment 87e2 Called by all notes off / omni on/off label 87f7 unknown2_operate comment 87f7 Sooner or later called by many(all?) entry points comment 87f9 Disable interrupts comment 8816 Enable interrupts, return comment 881a Enable interrupts label 885e yield_to_next_task comment 885e Load position of task_list comment 8860 Store current return address in task_list; go to next comment 8863 Are we at end of list? comment 8866 No, skip re-init comment 8868 Init task_list pointer to first element comment 886b Store pointer to task_list comment 886d Load return address label 8868 task_init label 8871 handleqchiposcinterrupt comment 8879 hmmm pointer 88fc label 88fc unk_vector_0 pointer 88fe label 88fe unk_vector_1 pointer 8900 label 8900 unk_vector_2 pointer 8902 label 8902 unk_vector_3 pointer 8904 label 8904 unk_vector_4 pointer 8906 label 8906 unk_vector_5 pointer 8908 label 8908 unk_vector_6 pointer 890a label 890a unk_vector_7 pointer 890c label 890c unk_vector_8 pointer 890e label 890e unk_vector_9 pointer 8910 label 8910 unk_vector_10 pointer 8912 label 8912 unk_vector_11 pointer 8914 label 8914 unk_vector_12 pointer 8916 label 8916 unk_vector_13 pointer 8918 label 8918 unk_vector_14 pointer 891a label 891a unk_vector_15 pointer 891c label 891c unk_vector_16 pointer 891e label 891e unk_vector_17 pointer 8920 label 8920 unk_vector_18 pointer 8922 label 8922 unk_vector_19 pointer 8924 label 8924 unk_vector_20 pointer 8926 label 8926 unk_vector_21 pointer 8928 label 8928 unk_vector_22 pointer 892a label 892a unk_vector_23 pointer 892c label 892c unk_vector_24 pointer 892e label 892e unk_vector_25 pointer 8930 label 8930 unk_vector_26 pointer 8932 label 8932 unk_vector_27 pointer 8934 label 8934 unk_vector_28 pointer 8936 label 8936 unk_vector_29 pointer 8938 label 8938 unk_vector_30 pointer 893a label 893a unk_vector_31 label 8951 irqentry_extclock comment 8951 00000010 comment 8953 If this is an external clock jack interrupt, comment 8955 Clear VIA interrupt status comment 8958 Check if external clock jack is enabled comment 895a Otherwise, return comment 895c Increase count comment 895e Send MIDI clock label 8961 irqentry_extclock_return label 8962 checkqchiposcinterrupt comment 8978 Disable interrupts comment 897f Disable independent interrupt(?), port A2 comment 8984 High output interrupt mode, port A2 comment 8987 Enable interrupts label 89a1 check_b_90 label 89ac check_b_80 label b9b7 check_b_b8 label b9d4 check_b_b9 comment 89c1 foot pedal status=1 comment 89d4 is it SusPedal Up? comment 89d8 is it SeqControl or SusPedal? comment 89da it's SeqControl, branch comment 89dc foot pedal status=0 comment 89df do TxMidi SusPedal (b=0 suspedup, b=7f suspeddown) comment 89e2 do seq SusPedal comment 89e5 local Mod Table comment 89e8 do local suspedal up (local synth service @ 87bf) label 89eb rts_fom_here ;label 893c irqentry label 8a5e task_one_work comment 8a5e Start at beginning of voice table comment 8a61 This is an unknown (to me) part of the q-chip with 4-bytes entries for each voice label 8a68 task_one_loop comment 8a68 Handle 1 voice comment 8a6a Increase voice table pointer by $4d (one voice) comment 8a6f Did we just finish the last voice? comment 8a72 Otherwise, loop commentline 8a8d The code that follows handles one voice (filter and amplitude at least) commentline 8a8d It is called 8 times each time task one runs label 8a8d handle_voice comment 8a8d Disable interrupts comment 8a8f Get filter enevelope counter from voice table comment 8a92 Jump to current filter envelope handler label 8a95 voice_filter_A comment 8a95 Add filter Attack slope from voice table (increase volume until peak) comment 8a98 If this caused a carry, A is done (overflow) comment 8a9a Compare to Peak comment 8a9d If it is larger than peak, we're also done comment 8a9f Attack is done.. Switch to Decay handler comment 8aa2 Store it in voice table comment 8aa5 Get filter Peak from voice table (Decay counts down from this) comment 8aa8 Clear LSB comment 8aa9 Store it in filter env. counter label 8aae voice_filter_D comment 8aae Subtract filter Decay slope from voice table (decrease volume until sustain) comment 8ab1 If this caused a carry, D is done (overflow) comment 8ab3 Compare to sustain comment 8ab6 If it is smaller than sustain, we're also done comment 8ab8 Decay is done.. Switch to Release handler comment 8abb Store it in voice table comment 8abe Get filter Sustain from voice table comment 8ac1 Clear LSB comment 8ac2 Store it in filter env. counter label 8ac7 voice_filter_R comment 8ac7 Subtract filter Release slope from voice table (decrease volume until 0) comment 8aca If this didn't cause a carry, R isn't done comment 8acc Release is done.. Switch to no handler (no filter envelope active for this voice) comment 8acf Store it in voice table comment 8ad4 Clear filter envelope counter (attack starts with this value) label 8ad7 handle_voice_continue comment 8ad7 Enable interrupts (filter envelope done) comment 8adc If counter is under cutoff, skip load comment 8ade Load cutoff label 8ae1 voice_cutoff_skip_load comment 8ae1 Load resonance comment 8ae7 Disable interrupts (start amp envelope handling) comment 8ae9 Get amp. env. counter from voice table comment 8aec Jump to current amp. env. handler label 8aef voice_amp_A label 8b0f voice_amp_D label 8b49 voice_amp_R label 8b81 do_mix_mod comment 8b81 Get osc. mix from voice table comment 8b8a If mix modulator source is poly aftertouch, comment 8b8c get poly aftertouch from voice table label 8b91 mix_mod_load comment 8b91 Otherwise, get mix mod value from pointer in voice table label 8b94 mix_mod_skip_load comment 8bbe Enable interrupts commentline 8bc1 This forces filter release at a constant rate (#$40) label 8bc1 force_constant_filter_release label 8bcd read_pitch_table comment 8beb Store pitch in voice table data 8bf1-8bfc label 8bf1 pitch_table label 8c46 readexptable label 8c4f readtri2table comment 8c50 Get LFO freq from voice table comment 8c53 Get counter from voice table comment 8c56 Store increased counter comment 8c5c Use as offset into tri2_table comment 8c71 save wave delta on stack comment 8c78 save slightly modified wave delta on stack commentline 8c80 Turn both filter and amp. envelope off label 8c80 all_envelopes_off label 8ca0 cutoff_value comment 8ca9 Get filter keyboard tracking from program table comment 8cb8 Add filter cutoff from program table comment 8cba If (B > 255), A += 1 comment 8cbc Add relative filter freq. from WCB comment 8cbe If (B > 255), A += 1 comment 8cff Store cutoff comment 8d22 Get relative amplitude from WCB label 8d03 unk75 comment 8d29 Get velocity from voice table comment 8d2d Get key from voice table comment 8d33 Get osc. detune from program table comment 8d35 If osc. detune = 1, comment 8d37 don't divide osc. detune (don't make it 0) comment 8d39 If key < 16, comment 8d3b don't divide osc. detune comment 8d3d Divide osc. detune by 2 label 8d3e unk75_osc_detune_dont_divide comment 8d3e Store osc. detune in voice table comment 8d41 Get resonance from program table comment 8d43 Store resonance in voice table comment 8d46 Get LFO frequency from program table comment 8d48 Store LFO frequency in voice table comment 8d4b Get LFO depth from program table comment 8d4d Store LFO depth in voice table comment 8d50 Clear LFO counter comment 8d53 Get mix vel sens. from program table comment 8d55 Is mix vel. sens. = 0? comment 8d57 No, mix vel. sens. -= 4 comment 8d59 Load velocity comment 8d5b mix vel. sens. *= 2 comment 8d5c velocity *= 2 comment 8d5d D = A * B comment 8d5e Increase A comment 8d5f Add mix vel. sens. to mix value from program table comment 8d61 If mix > $FF comment 8d63 then mix = $FF label 8d65 unk75_mix_continue comment 8d65 Store osc. mix in voice table label 8d68 unk75_init_env comment 8d6a Clear amp. env. counter comment 8d6d Clear filter env. counter comment 8d70 Clear $26 = ??? comment 8d73 Filter starts with attack comment 8d76 Store filter env. handler in voice table comment 8d79 Amplitude starts with attack comment 8d7c Store amp. env. handler in voice table comment 8d82 Filter envelope comment 8d85 Amplitude settings are $0a after filter in program param. block comment 8d87 And $0f bytes after in voice table comment 8d89 Amplitude envelope comment 8d8c Reset voice table counter comment 8d8e Get relative amplitude comment 8d90 Get amplitude peak comment 8d93 Multiply by relative amplitude comment 8d94 Store amplitude peak comment 8d97 Get relative amplitude comment 8d99 Get amplitude sustain comment 8d9c Multiply by relative amplitude comment 8d9d Store amplitude sustain label 8da1 envelope_APDS comment 8da1 Get attack vel. sens. comment 8da4 Get velocity comment 8da8 Add attack comment 8dac Store attack in voice table comment 8daf Get peak vel. sens. comment 8db2 Get velocity comment 8db5 Add peak comment 8dc5 Store peak in voice table comment 8dc8 Get decay keyb. scaled comment 8dcb Get key comment 8dd7 Add decay comment 8ddb Store decay in voice table comment 8dde Get sustain vel. sens. comment 8de1 Get velocity comment 8de4 Add sustain comment 8df2 Store sustain in voice table commentline 8e05 Is this by any chance called on note off to force envelope release? label 8e05 force_envelope_release comment 8e05 Get parameter block pointer from voice table comment 8e0a Filter release handler comment 8e0d Store filter env. handler in voice table comment 8e10 Amp. release handler comment 8e13 Store amp. env. handler in voice table comment 8e18 Get filter release vel. sens. from parameter block comment 8e1d Add filter release from parameter block comment 8e22 Store filter release slope in voice table comment 8e27 Get amp. release vel. sens. from parameter block comment 8e2c Add amp. release from parameter block comment 8e2f Get amp. env. counter MSB from voice table comment 8e33 Store amp. attack(?) slope in voice table comment 8e41 Store amp. release slope in voice table comment 8e45 Get key from voice table data 8e71-8eae pointer 8eaf label 8eaf lower_wcb_pointer_list pointer 8eb1 pointer 8eb3 pointer 8eb5 pointer 8eb7 pointer 8eb9 pointer 8ebb pointer 8ebd pointer 8ebf label 8ebf upper_wcb_pointer_list pointer 8ec1 pointer 8ec3 pointer 8ec5 pointer 8ec7 pointer 8ec9 pointer 8ecb pointer 8ecd data 8ff9-8fff data 9000-9009 data 900a comment 900a Subtracted when A/D is read label 900a u_ad_01_calibration_value data 900b label 900b last_wheel_val data 900c label 900c u_ad_01_calibration_value_1 data 900d label 900d u_ad_01_calibration_value_2 data 900e label 900e u_ad_01_calibration_value_3 label 900f unknown1_handler_loop label 901f unknown2_handler_loop label 9039 ad_read comment 9039 Disable interrupts comment 903b Read bank/disk sel. comment 903e xxxxx0xx comment 9040 xxxx1xxx comment 9042 Write bank/disk sel. comment 9045 Enable interrupts comment 9047 ?? comment 904a Read a/d converter label 9050 read_pitch_wheel comment 9050 Disable interrupts comment 9052 read mod wheel comment 9058 set mux to what? comment 905d Enable interrupts comment 905f store a/d value comment 9062 a=0 b still = comment 9063 add earlier value comment 9066 ?? comment 9068 add 2nd earlier value comment 906e div by 2 comment 9070 div by 2 comment 9074 read adc again comment 90a9 read_mod_wheel 0-255 comment 90ac divide by 2 comment 90ad same as last mod wheel value we sent? comment 90b2 save it comment 90b5 I mean, save it. comment 90b7 I really mean, save it comment 90bf bail out(RTS) commentline 90e2 Start of keypad code label 90e2 keypad_handler_loop label 90e9 button_enter label 90f3 button_check_if_10_to_17 label 9101 button_not_10_to_17 label 9116 button_A_to_F comment 9118 Cancel button label 9124 button_param label 912b display_param_number comment 9130 LED seg patterns label 913b button_value label 9142 display_param_value label 9148 button_up comment 9150 remember keycode comment 9154 decrement val label 9158 button_down comment 9166 increment val label 916a goto_display comment 916c 200ms repeat label 916e loop_repeat_up_down label 917c repeat_up_down label 9197 end_repeat_up_down label 9198 handle_enter comment 91a8 sampling? label 91ad enter_seq label 91bf enter_pgm_change label 91d3 enter_load label 91f1 enter_error label 9200 enter_ok label 9234 enter_exit label 923c cancel_param label 9247 button_exit label 9249 reset_ui_state comment 9249 state = 0 comment 924b oper = 0 comment 924d dot on left comment 924f display param comment 9251 flash timer comment 9253 flash flag L comment 9255 flash flag R label 9258 handle_number comment 9258 LED seg patterns comment 926c "L" comment 9270 "U" comment 927D don't flash left label 9284 handle_program comment 928d "L" comment 9296 "U" comment 92a3 blink label 92ab handle_second_digit comment 92b7 1st digit label 92d4 handle_save_lower comment 92df "L" label 92e4 handle_save_upper comment 92ec "U" label 92f1 handle_save_both comment 92f9 "A" label 92fb handle_save_msg comment 92fb "S" label 9309 handle_save_config comment 930d "SP" label 931d copy_pgm_lower label 9325 copy_pgm_upper label 932d second_digit_err comment 932d "no" label 9336 handle_number_1_3 label 934a handle_number_1_9 label 9357 handle_number_disp label 9361 handle_seq_num comment 9361 "S" label 9365 handle_sound_num comment 9365 "L" label 937c handle_change_number label 93a0 handle_pgm_change label 9412 handle_change_pgm commentline 9412 ???? label 9431 ui_flash comment 9434 flash comment 9436 both digits comment 9438 no dots label 943b button_10_to_17 comment 943b LED seg patterns label 9440 button_load_upper label 9444 button_load_lower comment 9454 "L" comment 945c "L" comment 9465 "U" label 9465 button_load_upper_2 label 9470 button_load_all comment 948f "LA" label 949b button_sample_upper label 94a1 button_sample_lower comment 94ad "U" label 94b5 button_sample_lower_2 comment 94b5 "L" label 94b9 button_sample_upper_2 comment 94b9 "S" label 94d2 button_sample_start label 94d8 button_sample_loop comment 9512 "nS" label 951b button_sample_ok comment 951b "SF" label 9525 button_sample_cancel label 952d button_seq commentline 952d Sequencer buttons, keypad codes $14-$17 comment 952f Record sequence button comment 9535 Save sequence button comment 9541 seq play comment 9547 Check if sequence is running? Loaded? Something like that... comment 9565 "od" comment 95b3 seq load comment 95bb "L" comment 95bf seq save comment 95d7 "S" label 95d9 disp_xS comment 95d9 "S" label 95dd button_flash_return label 95e0 button_return label 95e1 edit_playback_rate label 95e4 edit_playback_rate_2 comment 95e4 87: rate param comment 95e8 Value keycode comment 95ff $1A converts to... comment 9605 ...$0C (param button) comment 960f $1b is ??? comment 9629 "Sr" comment 963c Param keycode comment 964c Seq play comment 9662 Seq stop comment 9676 Seq continue comment 967a Cancel keycode comment 96b0 Enter keycode label 96f4 seq_record_msg comment 96f4 "Sr" commentline 998b Start of parameter code commentline 998b Operate on parameter (param is in $8b) label 998b param comment 9992 Store value of param in pt in $ac comment 9996 B = (value & $3F) comment 999a Store (value & $80) in $ab (switch has MS bit set) comment 999c Minimum value 0 comment 999e Decimal comment 99a2 Step value 1 commentline 99a4 Start of code to check which param to operate on (param is in $8b) label 99a4 param_choose label 99a6 p_midi_local commentline 99b0 Jump ahead if <27 or >59 (Most of the program settings are from 27-59) label 99b0 p_27_to_59 label 99c2 param_block_addr label 99ca param_block_addr_lower label 99ce p_initial_wavesample label 99ee p_mix_mode label 9a06 p_monophonic_mode label 9a20 p_oscillator_mix label 9a2c p_osc_mix_vel_sens label 9a38 p_filter_cutoff_freq label 9a44 p_filter_resonance label 9a4d p_filter_vel commentline 9a4d Handle parameters 45-49: label 9a5a p_amp_vel commentline 9a5a Handle parameters 55-59: label 9a67 p_not_vel commentline 9a67 Set max value using low 6 bits commentline 9a67 of pt as index into mv_00 commentline 9a73 Get here if param <26 or >59 commentline 9a73 Jump ahead if <60 or >72 label 9a73 p_60_to_72 label 9a85 param_wcb_ptr_addr label 9a93 param_wcb_ptr_addr_lower commentline 9aa1 Jump ahead if <60 or >64 label 9aa1 p_60_to_64 label 9ac7 p_loop_switch label 9ae2 p_wavesample_rotate label 9b02 p_relative_filter_freq label 9b08 p_maximum_filter_freq label 9b0f p_top_key label 9b23 p_70_to_72 commentline 9b2f Get here if param <26 or >72 commentline 9b2f Jump ahead if <81 or >88 label 9b2f p_81_to_88 label 9b39 p_midi_omni_mode label 9b42 p_midi_channel label 9b51 p_midi_thru_mode label 9b5a p_midi_controller_enable label 9b65 p_external_sequencer_clock label 9b6e p_external_clock_jack label 9b77 p_internal_clock_rate label 9b8b p_sequencer_loop_switch label 9b92 jmp_param_operate commentline 9b95 Code to operate on other parameters commentline 9b95 Get here if param <26, 73-80, >88 label 9b95 p_rest label 9b97 p_upper_lower_balance label 9ba8 p_program_link_switch label 9bb2 p_wavesample_select label 9bca p_mastertune label 9bd8 p_pitch_bender_range label 9be1 p_velocity_sensitivity label 9bea jmp_param_operate_2 label 9bed p_sample_time_adjust label 9bff p_input_filter_freq label 9c10 p_mic_line_switch label 9c1a p_sampling_threshold label 9c2b p_multisample_switch label 9c35 p_lfo_modulator_source label 9c3e p_mix_modulator_source label 9c48 p_aftertouch_mod_depth label 9c58 p_seq_foot_sus_pedal_switch label 9c76 p_external_computer_port label 9c7f p_baud_rate label 9c98 p_software_version label 9ca3 p_fd_error label 9cae p_fd_status label 9cb9 param_error comment 9cbc "no" commentline 9cc1 Perform operation (increase, decrease, display) on parameter in X commentline 9cc1 ab is 00 => 84 is 00 => display commentline 9cc1 --- 84 is mi => decrease commentline 9cc1 --- 84 is ** => increase commentline 9cc1 ab is ** => 84 is 00 => display commentline 9cc1 --- 84 is mi => Set (,X) to 0 (decrease), display commentline 9cc1 --- 84 is ** => Set (,X) to 1 (increase), display label 9cc1 param_operate label 9cc5 param_switch_operate label 9ccb param_switch_on label 9cd1 param_switch_off label 9cd3 param_switch_display comment 9cd3 "on" comment 9cda "oF" label 9cdc param_switch_x_is_on label 9cdf param_increase_or_decrease label 9ce5 param_increase comment 9ceb Increase parameter label 9cf1 param_decrease comment 9cf7 Decrease parameter commentline 9cfb Display parameter at address X commentline 9cfb a3 is 00 => display (,X) commentline 9cfb a3 is mi => a3 is 81 => display (,X) div 2 commentline 9cfb --- a3 is ** => display (,X) div 4 commentline 9cfb a3 is ** => display (,X)+1 label 9cfb param_display_from_x label 9d06 param_display_divide label 9d0a param_display_divide_by_2 label 9d0d param_display_divide_by_4 commentline 9d0f Display B. If $AC has most sig. bit set, B is hexadecimal. label 9d0f param_display_b commentline 9d15 A = Most significant nibble of B (digit 1) commentline 9d15 B = Least significant nibble of A (digit 2) label 9d15 param_separate_hex label 9d21 param_ac_is_0xxxxxxx commentline 9d23 Display digits in D (A, B) label 9d23 param_display_b_continue commentline 9d2d A = B div 10 (digit 1) commentline 9d2d B = B mod 10 (digit 2) label 9d2d param_separate_dec label 9d2e param_separate_dec_loop label 9d37 param_separate_dec_return commentline 9d38 Parameter is stored multiplied by 2 label 9d38 p_param_div_2 comment 9d38 Display divided by 2 comment 9d3c Increase/decrease by 2 commentline 9d41 Parameter is stored multiplied by 4 label 9d41 p_param_div_4 comment 9d41 Display divided by 4 comment 9d45 Increase/decrease by 4 data 9d4a commentline 9d4a keypad button state commentline 9d4a 0: Initial state commentline 9d4a 1: Button down, debouncing commentline 9d4a 2: Autorepeating up/down keys label 9d4a Keypad_button_state label 9d4b wait_for_button label 9d52 button_state_0 label 9d5f button_up_arrow label 9d68 button_not_arrow comment 9d6a button pressed? comment 9d72 start timer label 9d84 button_no_button label 9d88 test_button_state_1 commentline 9d88 Debounce: wait 5ms before next keypress label 9d8c button_state_1 comment 9d8f check timer comment 9d95 wait for keyup comment 9d9b debounce keyup label 9d9d button_keyup_wait label 9dad test_button_state_2 commentline 9dad If arrow key is still pressed, return immediately label 9db1 button_state_2 label 9dc6 arrow_key_released commentline 9dc6 Fake "Value" keypress, start debounce timer, return label 9dd3 rts_from_keypad label 9dd4 bra_button_state_0 commentline 9dd7 Write LED segment data to display from buffer commentline 9dd7 at $80b3-80b4, modified by flags at $83, $89, $8a commentline 9dd7 Also read state of keypad switches and store commentline 9dd7 in $80ae (logical code) and $80af (physical code) label 9dd7 ui_service comment 9dd7 LED data comment 9dd9 do dots label 9dec ui_service_loop comment 9df2 flash left? comment 9e06 flash right? commentline 9e1e write two LED segments to VIA latch commentline 9e25 read state of three keypad switches label 9e30 ui_got_button commentline 9e56 what's this? label 9e56 wait_ui_flag label 9e5f got_ui_flag commentline 9e67 Which of three switches has 0 bit? label 9e67 ui_bit_search label 9e6e ui_zero_bit comment 9e70 scan cnt * 3 comment 9e75 + position of 0 bit comment 9e77 = physical keycode label 9e79 ui_no_button label 9e83 handle_errors comment 9e85 op=load snd comment 9ea8 op=save snd comment 9ec6 op=load seq comment 9ece op=save seq comment 9edc op=save lseq comment 9ee9 op=save cfg label 9efa error_reinit label 9f1b show_error_msg comment 9f27 "dE" comment 9f34 "nF" comment 9f3d "ud" comment 9f46 "nd" comment 9f4f "Pd" comment 9f58 "nc" label 9f5b error_msg_rts label 9f5e error_hang comment 9f60 Disable interrupts comment 9f62 Reset sequencer comment 9f65 Reset q-chip comment 9f68 Reset envelopes comment 9f6b Reset VIA comment 9f6f Disable interrupts comment 9f97 Enable interrupts comment 9fa0 "L" comment 9fa4 "U" comment 9fa6 "C" comment 9fe6 "no" commentline 9ff3 Options for parameters commentline 9ff3 These are calculated as follows: commentline 9ff3 program parameter switch => $80 | program parameter table offset commentline 9ff3 program parameter => program parameter table offset commentline 9ff3 other switch => $81 commentline 9ff3 all => value & $3f gives offset in max value table (mv) data 9ff3 label 9ff3 pt_table comment 9ff3 00 data 9ff4 comment 9ff4 01 data 9ff5 comment 9ff5 02 data 9ff6 comment 9ff6 03 data 9ff7 comment 9ff7 04 data 9ff8 comment 9ff8 05 data 9ff9 comment 9ff9 06 data 9ffa comment 9ffa 07 data 9ffb comment 9ffb 08 data 9ffc comment 9ffc 09 data 9ffd comment 9ffd 0a data 9ffe comment 9ffe 0b data 9fff comment 9fff 0c data a000 comment a000 0d data a001 comment a001 0e data a002 comment a002 0f data a003 comment a003 10 data a004 comment a004 11 data a005 comment a005 12 data a006 comment a006 13 data a007 comment a007 14 data a008 comment a008 mastertune data a009 comment a009 pitch_bender_range data a00a comment a00a velocity_sensitivity data a00b comment a00b upper_lower_balance data a00c comment a00c program_link_switch data a00d comment a00d wavesample_select data a00e comment a00e initial_wavesample data a00f comment a00f mix_mode data a010 comment a010 monophonic_mode data a011 comment a011 midi_local data a012 comment a012 lfo_freq data a013 comment a013 lfo_depth data a014 comment a014 oscillator_2_detune data a015 comment a015 oscillator_mix data a016 comment a016 mix_vel_sens data a017 comment a017 filter_cutoff_freq data a018 comment a018 filter_resonance data a019 comment a019 filter_keyboard_tracking data a01a comment a01a 27 data a01b comment a01b filter_a data a01c comment a01c filter_p data a01d comment a01d filter_d data a01e comment a01e filter_s data a01f comment a01f filter_r data a020 comment a020 filter_vel_a data a021 comment a021 filter_vel_p data a022 comment a022 filter_vel_d data a023 comment a023 filter_vel_s data a024 comment a024 filter_vel_r data a025 comment a025 amp_a data a026 comment a026 amp_p data a027 comment a027 amp_d data a028 comment a028 amp_s data a029 comment a029 amp_r data a02a comment a02a amp_vel_a data a02b comment a02b amp_vel_p data a02c comment a02c amp_vel_d data a02d comment a02d amp_vel_s data a02e comment a02e amp_vel_r data a02f comment a02f 3c data a030 comment a030 3d data a031 comment a031 3e data a032 comment a032 3f data a033 comment a033 40 data a034 comment a034 loop_switch data a035 comment a035 wavesample_rotate data a036 comment a036 43 data a037 comment a037 44 data a038 comment a038 45 data a039 comment a039 relative_filter_freq data a03a comment a03a maximum_filter_freq data a03b comment a03b top_key data a03c comment a03c sample_time_adjust data a03d comment a03d input_filter_freq data a03e comment a03e mic_line_switch data a03f comment a03f sampling_threshold data a040 comment a040 multisample_switch data a041 comment a041 lfo_modulator_source data a042 comment a042 mix_modulator_source data a043 comment a043 aftertouch_mod_depth data a044 comment a044 midi_omni_mode data a045 comment a045 midi_channel data a046 comment a046 midi_thru_mode data a047 comment a047 midi_controller_enable data a048 comment a048 external_sequencer_clock data a049 comment a049 external_clock_jack data a04a comment a04a internal_clock_rate data a04b comment a04b sequencer_loop_switch data a04c comment a04c seq_foot_sus_pedal_switch data a04d comment a04d 5a data a04e comment a04e external_computer_port data a04f comment a04f baud_rate data a050 comment a050 5d data a051 comment a051 5e data a052 comment a052 5f data a053 comment a053 60 data a054 comment a054 software_version data a055 comment a055 fd_error data a056 comment a056 fd_status commentline a057 Table of max values. Offset given by pt & $3f data a057 label a057 mv_table comment a057 00 data a058 comment a058 lfo_freq data a059 comment a059 lfo_depth data a05a comment a05a oscillator_2_detune data a05b comment a05b oscillator_mix data a05c comment a05c mix_vel_sens data a05d comment a05d filter_cutoff_freq data a05e comment a05e filter_resonance data a05f comment a05f filter_keyboard_tracking data a060 comment a060 09 data a061 comment a061 0a data a062 comment a062 0b data a063 comment a063 filter_a data a064 comment a064 filter_p data a065 comment a065 filter_d data a066 comment a066 filter_s data a067 comment a067 filter_r data a068 comment a068 filter_vel_a data a069 comment a069 filter_vel_p data a06a comment a06a filter_vel_d data a06b comment a06b filter_vel_s data a06c comment a06c filter_vel_r data a06d comment a06d amp_a data a06e comment a06e amp_p data a06f comment a06f amp_d data a070 comment a070 amp_s data a071 comment a071 amp_r data a072 comment a072 amp_vel_a data a073 comment a073 amp_vel_p data a074 comment a074 amp_vel_d data a075 comment a075 amp_vel_s data a076 comment a076 amp_vel_r commentline a077 Max value table 2. Used for some parameters. ((value & $3f) - 8) data a077 label a077 mv2_table comment a077 00 data a078 comment a078 01 data a079 comment a079 02 data a07a comment a07a 03 data a07b comment a07b relative_filter_freq data a07c comment a07c maximum_filter_freq data a07d comment a07d top_key ;label A151 firqentry commentline a07e Start of midi code label a07e midi_setup comment a07e Master reset comment a080 Send to UART comment a083 Enable receive interrupt, Disable xmit interrupts(?), 8N1, Counter/16 comment a085 Send to UART comment a088 Put the address of the start of the ring buffer into both: comment a08b *) the transfer end pointer comment a08d *) and the buffer pointer comment a08f Put the address of the midi send subroutine into: comment a092 *) the midi send pointer comment a094 Put the return address into: comment a097 *) the midi handler pointer comment a099 Clear ??? comment a09c Clear ??? comment a09f Clear ??? commentline a0a3 This waits (yields) if the buffer is full commentline a0a3 When it returns, there is space in the buffer for more data comment a0a3 Save U,B,A label a0a3 midi_bufferfull_wait comment a0a5 Load the transfer end address into D label a0a5 midi_bufferfull_wait_loop comment a0a7 Subtract the buffer pointer (result: bytes left in buffer is in B) comment a0a9 If bytes_left is negative, bytes_left = -bytes_left label a0ac midi_bufferfull_wait_positive comment a0ae If bytes_left <= 8, return comment a0b0 Otherwise, yield to next task comment a0b5 Load U,B,A, return label a0b5 midi_bufferfull_wait_return label a0b7 send_note_on_msg_wait label a0b9 send_note_on_msg comment a0bb Disable interrupts comment a0bd A=note numb B=velocity comment a0bf 9n = note on message label a0c3 send_note_off_msg_wait label a0c5 send_note_off_msg comment a0c7 Disable interrupts comment a0c9 A=note numb B=velocity comment a0cb 8n = note off message label a0cf send_pitch_wheel_msg comment a0d1 Disable interrupts comment a0d3 LSB = 0 since we only use MSB comment a0d6 En = Pitch wheel label a0da send_hold_pedal_msg comment a0dc Disable interrupts comment a0de 40 = Pedal is down label a0e2 send_mod_wheel_msg comment a0e4 Disable interrupts comment a0e6 MIDI controller number of mod wheel label a0e8 send_contr_msg comment a0e8 store it in midi data byte 1 comment a0ea Bn = MIDI Controller Status message label a0ec send_check_contr_enabled comment a0ec are controllers enabled? commentline a10e Wait until send completes (interrupt driven) label a10e midi_wait_for_send_completion commentline a116 Send 1 timer clock label a116 midi_send_clock comment a118 Disable interrupts comment a11a F8 = MIDI timer clock comment a11c Store as last status comment a11e Send it comment a120 Enable interrupts, return commentline a122 Send MIDI message commentline a122 Upper nibble of B is command (byte 1) commentline a122 midi_temp_1 contains data byte 2 commentline a122 midi_temp_2 contains data byte 3 label a122 send_midi_message comment a122 add midi channel to status in B comment a124 is this the last status we sent? comment a126 skip_midi_status comment a12a send midi status byte label a12c send_midi_skip_midi_status comment a12e send MIDI data byte 1 comment a132 send MIDI data byte 2 label a134 conts_disabled comment a136 Enable interrupts, return label a138 midi_add_if_not_thru commentline a13d Add B to MIDI ring buffer label a13d midi_add label a149 midi_add_not_back_to_start label A151 midi_irq comment a15a Test for framing error, receiever overrun comment a15c Error handling label a163 midi_unknown_42 comment Jumps to this have something to do with the stack commentline a179 No framing error, no receiver overrun label a179 uart_xx00xxxx comment a17b Is receive data reg full? Ie. Have we received a byte? comment a17d Yes commentline a1a5 Receive data reg is not full label a1a5 uart_xx00xxx0 comment a1a5 If xmit data reg is empty comment a1a7 then we're ready to send, so branch label a1a9 midi_irq_done_1 commentline a1ac Pull the return address from the stack and put in the handler pointer commentline a1ac Then return to the next address in the stack label a1ac midi_store_handler_and_return commentline a1b1 Pull the return address from the stack and put in the send handler pointer commentline a1b1 Then return to the next address in the stack label a1b1 midi_store_send_handler_return label a1b6 midi_branch_to_send_handler commentline a1bc Send one MIDI byte. Called during interrupt label a1bc midi_send label a1cb midi_send_not_back_to_start comment a1d1 Does this do anything? label a1d3 midi_send_done label a1d8 midi_send_update_counter label a1db midi_receive_start label a1fb midi_irq_done_2 label a202 midi_receive comment a205 If MIDI thru is on, add byte to send buffer label a20c midi_receive_skip_send comment a20c Enable interrupts comment a20f If most significant bit is set, it's a control byte comment a211 Jump to midi handler (default is a return handler) commentline a215 Handle 1 MIDI control byte label a215 midi_handle_1xxxxxxx comment a215 Store current byte in $c5 comment a21d Channel information comment a221 Store MIDI channel in $c4 commentline a223 Is MIDI omni on? commentline a227 Correct MIDI channel? label a22e midi_handle_correct_channel comment a234 0000xxx0 = offset*2 because pointers occupy 2 bytes comment a238 Use B as offset into midi_handler_1xxxNNNN comment a23a Store in $c0 (midi handler pointer) label a23d midi_handle_1111xxxx comment a23d $c5? comment a244 0000xxx0 = offset*2 because pointers occupy 2 bytes comment a245 Jump into the handler table for 1111xxxx label a247 midi_handle_done label a24a midi_handle_return label a24b midi_handler_note_off comment a24d Wait for next byte comment a250 ??? comment a253 ??? comment a255 Is release velocity 0? comment a259 else set to 64 = medium label a25b midi_handler_note_off_vel_non_0 comment a25b Get note number comment a260 Get note number label a268 midi_handler_note_on comment a272 Get note number comment a274 Is velocity 0? comment a278 Set to 64 = medium comment a27a Note on with velocity 0 is the same as note off comment a27d Get note number label a285 midi_handler_note_on_vel_non_0 comment a288 Get note number label a290 midi_note_check_bounds comment a290 Is note number too low? comment a294 Add 12 comment a296 and try again label a298 midi_note_upper_bound comment a298 Is note number too high? comment a29c Subtract 12 comment a29e and try again label a2a0 midi_store_note comment a2a0 Store new note number commentline a2a3 Handle midi controller messages label a2a3 midi_handler_controller comment a2a3 Controller 64 = Sustain pedal on/off label a2ad midi_controller_01100000 comment a2ad Controller 96 = ??? label a2c2 midi_controller_lfo_mod comment a2c2 Controller 0-7 = Possible lfo modulators label a2c6 midi_controller_mix_mod comment a2c6 Controller 0-7 = Possible mix modulators label a2ca midi_controller_lfo_or_mix comment a2ca ??? label a2d2 midi_controller_channel comment a2db Skip check for Omni on/off if channel is incorrect label a2dd midi_controller_01111100 comment a2dd Controller 124 = Omni off label a2e5 midi_controller_01111101 comment a2e5 Controller 125 = Omni on label a2ed midi_controller_01111011 comment a2ed Controller 123 = All notes off label a2f1 midi_controller_all_notes_off label a2f7 midi_controller_return label a2f8 midi_handler_pitchbend comment a302 midi controller enable off? label a30c midi_handler_pb_return label a30d midi_handler_0_to_7 comment a311 midi controller enable off? comment a315 controller 0? comment a319 controller >7? comment a31b Change mix modulation? label a321 midi_handler_0_to_7_lfo comment a323 Change lfo modulation? label a32a midi_handler_0_to_7_return label a32b midi_handler_sustain comment a32f midi controller enable off? comment a334 Sustain on if B = x1xxxxxx label a340 midi_handler_sustain_return label a341 midi_set_handler_to_controller label a347 midi_handler_chan_at_return comment a347 Skip second byte (only 8 bit resolution) label a34a midi_handler_channel_aftertouch comment a34c midi_controller_enable off? comment a358 8 = channel aftertouch comment a360 8 = channel aftertouch label a368 midi_handler_poly_at_return comment a368 Skip second byte (only 8 bit resolution) label a36b midi_handler_poly_aftertouch comment a36d midi_controller_enable off? comment a371 Store note number comment a373 Wait for next byte (pressure) comment a376 Multiply pressure by 2 (MSB never set for midi data) comment a379 D = pressure * mod depth comment a37a B = A (put most sig. byte in B) comment a37e 9 = poly aftertouch comment a384 9 = poly aftertouch label a388 midi_handler_poly_at_continue comment a388 Get note number label a390 midi_handler_poly_at_done label a395 midi_handler_program_change commentline a3b0 Handle MIDI clock comment a3b2 If external clock jack is non-zero, return (this is handled by interrupts) label a3b0 midi_handler_clock comment a3b6 If external sequencer clock is zero, ignore midi clock comment a3b8 Increase external clock counter comment a3ba Echo clock to output label a3bd midi_handler_clock_return commentline a3be Realtime sequencer control commentline a3be This is done by inserting keypresses into the virtual button buffer label a3be midi_handler_seq_start comment a3be Seq Play label a3c2 midi_handler_seq_continue comment a3c2 Seq Continue label a3c6 midi_handler_seq_stop comment a3c6 Seq Stop label a3c8 midi_handler_seq_insert comment a3c8 Is external sequencer clock zero? comment a3cc Is external clock jack non-zero? label a3d3 midi_handler_seq_return commentline a3d4 Vectors for handling 1xxxNNNN, where: commentline a3d4 1 = Control byte commentline a3d4 xxx = Type of channel information commentline a3d4 NNNN = MIDI channel pointer a3d4 label a3d4 midi_handler_1xxxNNNN comment a3d4 1000NNNN pointer a3d6 comment a3d6 1001NNNN pointer a3d8 comment a3d8 1010NNNN pointer a3da comment a3da 1011NNNN pointer a3dc comment a3dc 1100NNNN pointer a3de comment a3de 1101NNNN pointer a3e0 comment a3e0 1110NNNN pointer a3e2 comment a3e2 1111NNNN Handled in the next table commentline a3e4 This vector table is used when the first nibble is 1111 label a3e4 midi_handler_1111xxxx pointer a3e4 comment a3e4 11110000 = sysex start pointer a3e6 comment a3e6 11110001 pointer a3e8 comment a3e8 11110010 = song position pointer pointer a3ea comment a3ea 11110011 = song select pointer a3ec comment a3ec 11110100 pointer a3ee comment a3ee 11110101 pointer a3f0 comment a3f0 11110110 pointer a3f2 comment a3f2 11110111 = sysex end (eox) pointer a3f4 comment a3f4 11111000 = timing clock pointer a3f6 comment a3f6 11111001 pointer a3f8 comment a3f8 11111010 = start pointer a3fa comment a3fa 11111011 = stop pointer a3fc comment a3fc 11111100 = continue pointer a3fe comment a3fe 11111101 pointer a400 comment a400 11111110 = active sensing pointer a402 comment a402 11111111 = system reset label a404 store_virtual_button label a41a get_virtual_button commentline a435 Start of fd code commentline a435 Floppy disk operations commentline a435 A = nr of operation label a435 fd_operation label a442 fd_operation_01 label a44e fd_operation_02 commentline a457 03 = Load config label a457 fd_operation_03 label a460 fd_operation_04 label a469 fd_operation_05 commentline a472 06 = Save config label a472 fd_operation_06 commentline a47b 07 = Load sequence, short label a47b fd_operation_07 commentline a484 08 = Save sequence, short label a484 fd_operation_08 commentline a48d 09 = Load sequence, long label a48d fd_operation_09 commentline a496 0a = Save sequence, long label a496 fd_operation_0a commentline a49f 0b = Save global config label a49f fd_operation_0b label a4a6 fd_operation_continue label a4b7 fd_operation_error label a4b9 fd_operation_ok label a4ba fd_operation_init label a4d4 fd_operation_load label a4f5 fd_operation_load_ok commentline a505 03 = Load config label a509 fd_op_01 label a52b fd_op_02 label a53a fd_operation_save comment a542 Is port B x0xxxxxx? comment a548 What error is this? label a54e fd_operation_save_ok commentline a560 06 = Save config label a564 fd_op_04 comment a569 Set port B to xxxxxx00 label a586 fd_op_05 comment a58b Set port B to xxxxxx00 label a5a1 fd_load_seq comment a5a9 Is port B x0xxxxxx? comment a5af OK label a5b5 fd_load_seq_error label a5fc fd_save_seq comment a604 Is port B x0xxxxxx? comment a60a OK label a653 fd_save_global comment a65b Is port B x0xxxxxx? comment a661 OK label a667 fd_save_global_error label a698 fd_save_global_done label a69c fd_transfer_conf label a6b0 fd_transfer_conf_ok label a6c7 fd_transfer_conf_not_load label a6ce fd_transfer_conf_check label a6da fd_transfer_conf_check_ok label a6e7 fd_transfer_conf_return commentline a736 Load config from disk (First at #0000, then move it (625 bytes)) label a736 fd_load_conf comment a736 Do these 5 lines select another bank than a wavesample bank? label a758 fd_load_conf_lower label a76a fd_load_conf_upper label a777 fd_load_conf_copy_bytes label a77e fd_load_conf_copy_bytes_loop label a78a fd_load_conf_error commentline a78b Save config to disk label a78b fd_save_conf label a794 fd_save_conf_lower label a79d fd_save_conf_upper label a7a4 fd_save_conf_write_disk label a847 fd_transfer_seq label a861 fd_transfer_seq_short label a869 fd_transfer_seq_long label a86f fd_transfer_seq_continue label a875 fd_transfer_seq_sector_start label a87f fd_transfer_seq_load label a884 fd_transfer_seq_save label a88b fd_transfer_seq_check label a894 fd_transfer_seq_check_ok label a8ab fd_transfer_seq_sector_done label a8b8 fd_transfer_seq_return label ab00 fd_error_handler label ab13 fd_error_handler_xxxx0xxx label ab1f fd_error_handler_return data ab2a-ab2b commentline ab2c Start of sequencer code label ab43 sequencer_set_e7_to_02 comment ab45 No internal clock pulses yet comment ab47 No external clock pulses yet comment ab49 Sequence is stopped? Not loaded? Something like that... label ab4e sequencer_set_e7_to_04 label ab53 sequencer_set_e7_to_06 label ab60 sequencer_set_e7_to_08 label ab80 sequencer_set_e7_to_0a label ab90 sequencer_set_e7_to_00 label ac4f sequencer_handler comment ac5b Sequencer expansion found; Store $D8 at $E4 comment ac5d ...and $D800 at $E5 label ac5f sequencer_handler_loop comment ac63 External sequencer clock comment ac6f Internal clock at $36 label ac85 seq_e7_is_4_or_6_or_36_is_0 comment ac81 Decrease internal clock label ac87 sequencer_ext_clock comment ac87 External clock at $E9 comment ac8b Clock pulse has arrived comment ac9a Decrease external clock label ac9e sequencer_dont_play label ace2 incr_80f0 label ad8e rts_out2 label adaf unknown_pitchbend comment adaf Called by pitchbend label adb2 unknown_0_to_7 comment adb2 Called by controllers 0-7 (mix/lfo mod) label adb6 do_seq_suspedal comment adb6 Called by sustain label adba unknown_note_on comment adba Called by note on label adbc unknown_note_off comment adbc Called by note off comment adbe Disable interrupts comment adc7 Enable interrupts comment adc9 Store B comment adce Press the param button (virtually) comment add3 Get B, return comment adfb bail out (RTS) comment ae01 bail out (RTS) comment ae09 Store B comment ae0e Causes 95f6 to be executed comment ae13 Get B label ae15 bail_out comment ae15 Enable interrupts, return commentline ae17 End of function unknown label ae17 init_filters comment ae17 Do something on all outputs.. Reset maybe? label ae1d init_filters_loop_1 comment ae26 Then put pointers and 0:s in the 8 data block at b052 label ae2f init_filters_loop_2 label aeb9 task1_stack label af31 task2_stack label af62 rts_out3 data af63-af6f data af70-b051 label afd1 task3_stack label b051 task4_stack label b052 voicetable_start commentline b052 Voice block 1 data b052-b055 pointer b056 comment b056 offset $04 = Pointer to mix mod. value(?) data b058 comment b058 offset $06 = Key + $24 (=36) data b059 data b05a comment b05a offset $08 = Velocity data b05b pointer b05c comment b05c offset $0a = ??? pointer b05e comment b05e offset $0c = ??? pointer b060 comment b060 offset $0e = ??? data b062-b063 comment b062 offset $10 = Pitch(?) data b064 comment b064 offset $12 = Counter, used for LFO (and more?). data b065 comment b065 offset $13 = LFO frequency data b066 comment b066 offset $14 = LFO depth data b067-b069 data b06a comment b06a offset $18 = Poly aftertouch(?) data b06b data b06c-b06d comment b06c offset $1a = Filter envelope counter pointer b06e comment b06e offset $1c = Filter envelope current handler (A,D,R) data b070-b071 comment b070 offset $1e = Filter Attack slope (not time!) data b072 comment b072 offset $20 = Filter Peak data b073-b074 comment b073 offset $21 = Filter Decay slope (not time!) data b075 comment b075 offset $23 = Filter Sustain data b076-b077 comment b076 offset $24 = Filter Release slope (not time!) data b078 comment b078 offset $26 = ??? data b079 comment b079 offset $27 = Filter cutoff data b07a comment b07a offset $28 = Filter resonance data b07b-b07c comment b07b offset $29 = $1a + $0f = Amplitude envelope counter pointer b07d comment b07d offset $2b = $1c + $0f = Amplitude envelope current handler (A,D,R) data b07f-b080 comment b07f offset $2d = $1e + $0f = Amplitude Attack slope (not time!) data b081 comment b081 offset $2f = $20 + $0f = Amplitude Peak data b082-b083 comment b082 offset $30 = $21 + $0f = Amplitude Decay slope (not time!) data b084 comment b084 offset $32 = $23 + $0f = Amplitude Sustain data b085-b086 comment b085 offset $33 = $24 + $0f = Amplitude Release slope (not time!) data b087 data b088 comment b088 offset $36 = Oscillator mix data b089 label b089 osentry_stack_1_31 comment b089 Pointed to by table at $88fc data b08a-b08d data b08e data b08f-b09e commentline b09f Voice block 2 data b09f-b0eb commentline b0ec Voice block 3 data b0ec-b138 commentline b139 Voice block 4 data b139-b185 commentline b186 Voice block 5 data b186-b1d2 commentline b1d3 Voice block 6 data b1d3-b21f commentline b220 Voice block 7 data b220-b26c commentline b26d Voice block 8 data b26d-b2b9 label b2ba voicetable_end data b2ba-b2bd pointer b2be commentline b2be A list of tasks that the OS repeats through comment b2be task #1 handler label b2be task_list pointer b2c0 comment b2c0 task #2 handler pointer b2c2 comment b2c2 task #3 handler pointer b2c4 comment b2c4 task #4 handler data b2c6-b31c data b31d commentline b31d Start of sample settings (program dump table) label b31d lower_sound_rev_level pointer b31e pointer b320 pointer b322 pointer b324 data b325-b335 label b31e lower_wcb_1 pointer b336 pointer b338 pointer b33a pointer b33c data b33d-b34d label b336 lower_wcb_2 pointer b34e pointer b350 pointer b352 pointer b354 data b356-b365 label b34e lower_wcb_3 pointer b366 pointer b368 pointer b36a pointer b36c data b36d-b37d label b366 lower_wcb_4 pointer b37e pointer b380 pointer b382 pointer b384 data b386-b395 label b37e lower_wcb_5 pointer b396 pointer b398 pointer b39a pointer b39c data b39d-b3ad label b396 lower_wcb_6 pointer b3ae pointer b3b0 pointer b3b2 pointer b3b4 data b3b6-b3c5 label b3ae lower_wcb_7 pointer b3c6 pointer b3c8 pointer b3ca pointer b3cc data b3ce-b3dd label b3c6 lower_wcb_8 data b3de-b3fd label b3de lower_segment_list_1 data b3fe-b41d label b3fe lower_segment_list_2 data b41e-b43d label b41e lower_segment_list_3 data b43e-b45d label b43e lower_segment_list_4 data b45e-b47d label b45e lower_segment_list_5 data b47e-b49d label b47e lower_segment_list_6 data b49e-b4bd label b49e lower_segment_list_7 data b4be-b4dd label b4be lower_segment_list_8 data b4de-b4fd label b4de lower_segment_list_spare data b4fe-b521 label b4fe lower_parameter_block_1 data b522-b545 label b522 lower_parameter_block_2 data b546-b569 label b546 lower_parameter_block_3 data b56a-b58d label b56a lower_parameter_block_4 data b58e label b58e upper_sound_rev_level pointer b58f pointer b591 pointer b593 pointer b595 data b597-b5a6 label b58f upper_wcb_1 pointer b5a7 pointer b5a9 pointer b5ab pointer b5ad data b5af-b5be label b5a7 upper_wcb_2 pointer b5bf pointer b5c1 pointer b5c3 pointer b5c5 data b5c7-b5d6 label b5bf upper_wcb_3 pointer b5d7 pointer b5d9 pointer b5db pointer b5dd data b5df-b5ee label b5d7 upper_wcb_4 pointer b5ef pointer b5f1 pointer b5f3 pointer b5f5 data b5f7-b606 label b5ef upper_wcb_5 pointer b607 pointer b609 pointer b60b pointer b60d data b60f-b61e label b607 upper_wcb_6 pointer b61f pointer b621 pointer b623 pointer b625 data b627-b636 label b61f upper_wcb_7 pointer b637 pointer b639 pointer b63b pointer b63d data b63f-b64e label b637 upper_wcb_8 data b64f-b66e label b64f upper_segment_list_1 data b66f-b68e label b66f upper_segment_list_2 data b68f-b6ae label b68f upper_segment_list_3 data b6af-b6ce label b6af upper_segment_list_4 data b6cf-b6ee label b6cf upper_segment_list_5 data b6ef-b70e label b6ef upper_segment_list_6 data b70f-b72e label b70f upper_segment_list_7 data b72f-b74e label b72f upper_segment_list_8 data b74f-b76e label b74f upper_segment_list_spare data b76f-b792 label b76f upper_parameter_block_1 data b793-b7b6 label b793 upper_parameter_block_2 data b7b7-b7da label b7b7 upper_parameter_block_3 data b7db-b7ff label b7db upper_parameter_block_4 data b800-b835 label b800 sequences commentline b800 Everything after this point is overwritten when sequences are loaded ascii b836-b86c ascii b86d-b8b3 data b8b4-b8ff label b900 task_list_copy label b90c task_list_copy_loop ;label B920 osentry comment b927 Set DP to $80 (for fast access to $80xx parameters) label b935 u_ad_01_calibrate comment b937 Setup AD converter for input from ... comment b93a ??? comment b93d Get byte from A/D comment b940 Wait? comment b943 Get byte from A/D comment b946 Store comment b949 Wait? comment b94c Get byte from A/D comment b94f Store comment b952 Wait? comment b955 Get byte from A/D comment b958 Store comment b95b Throw away initial value comment b96a Store an average? commentline b987 Copied to task_list by osentry pointer b987 comment b987 task #1 stack label b987 initial_task_list pointer b989 comment b989 task #1 handler pointer b98b comment b98b task #2 stack pointer b98d comment b98d task #2 handler pointer b98f comment b98f task #3 stack pointer b991 comment b991 task #3 handler pointer b993 comment b993 task #4 stack pointer b995 comment b995 task #4 handler data b997-bfff label b997 initial_task_list_end