Subversion Repositories svn.mios

Rev

Rev 897 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 897 Rev 1122
Line 1... Line 1...
1
; $Id: sid_midi_b.inc 897 2010-03-06 14:24:52Z tk $
1
; $Id: sid_midi_b.inc 1122 2013-04-20 12:37:28Z tk $
2
;
2
;
3
; MIDIbox SID
3
; MIDIbox SID
4
; MIDI Interface part for Bassline Engine
4
; MIDI Interface part for Bassline Engine
5
;
5
;
6
; ==========================================================================
6
; ==========================================================================
Line 399... Line 399...
399
	movlw	SID_MVx_MIDI_CHANNEL
399
	movlw	SID_MVx_MIDI_CHANNEL
400
	movf	PLUSW0, W
400
	movf	PLUSW0, W
401
	cpfseq	SID_CURRENT_CHANNEL, BANKED
401
	cpfseq	SID_CURRENT_CHANNEL, BANKED
402
	rgoto SID_MIDI_B_CC_Loop_Next
402
	rgoto SID_MIDI_B_CC_Loop_Next
403
403
404
	;; if CC#06 (NRPN data LSB) received, forward to parameter handler
404
	;; if CC#06 (NRPN data MSB) received, forward to parameter handler
405
	movlw	0x06
405
	movlw	0x06
406
	cpfseq	SID_MIDI_PARAMETER1, BANKED
406
	cpfseq	SID_MIDI_PARAMETER1, BANKED
407
	rgoto SID_MIDI_B_CC_NoNRPNDataH
407
	rgoto SID_MIDI_B_CC_NoNRPNDataH
408
SID_MIDI_B_CC_NRPNDataH
408
SID_MIDI_B_CC_NRPNDataH
409
	;; prepare MIOS_PARAMETER3 (selection options)
409
	;; prepare MIOS_PARAMETER3 (selection options)
Line 419... Line 419...
419
	rgoto SID_MIDI_B_CC_Not64
419
	rgoto SID_MIDI_B_CC_Not64
420
SID_MIDI_B_CC_64
420
SID_MIDI_B_CC_64
421
	;; TODO: not supported yet
421
	;; TODO: not supported yet
422
SID_MIDI_B_CC_Not64
422
SID_MIDI_B_CC_Not64
423

423

-
 
424
	;; handle remaining CCs
-
 
425
	movf	SID_CURRENT_MIDIVOICE, W, BANKED	; expecting instrument in MIOS_PARAMETER3[5:4]
-
 
426
	call	MIOS_HLP_GetBitORMask
-
 
427
	andlw	0x03
-
 
428
	swapf	WREG, W
-
 
429
	movwf	MIOS_PARAMETER3
424
SID_MIDI_B_CC_Loop_Next
430
	call	SID_CC_TABLE_Set
425
431
426
	;; extra: ignore if MIDI channel of second bassline matches with first bassline
-
 
427
	;; (parameter transfer already done)
-
 
428
	movff	SID_MV1_BASE+SID_MVx_MIDI_CHANNEL, PRODL
-
 
429
	movff	SID_MV2_BASE+SID_MVx_MIDI_CHANNEL, WREG
-
 
430
	xorwf	PRODL, W
-
 
431
	bz	SID_MIDI_B_CC_Loop_End
432
SID_MIDI_B_CC_Loop_Next
432
433
433
	movlw	SID_MVx_RECORD_LEN
434
	movlw	SID_MVx_RECORD_LEN
434
	addwf	FSR0L, F
435
	addwf	FSR0L, F
435
	incf	SID_CURRENT_MIDIVOICE, F, BANKED
436
	incf	SID_CURRENT_MIDIVOICE, F, BANKED
436
	movlw	2-1
437
	movlw	2-1