Subversion Repositories svn.mios

Rev

Rev 869 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 869 Rev 878
Line 1... Line 1...
1
; $Id: sid_parin.inc 869 2009-12-08 21:52:43Z tk $
1
; $Id: sid_parin.inc 878 2010-01-02 15:40:58Z tk $
2
;
2
;
3
; MIDIbox SID
3
; MIDIbox SID
4
; Parameter Input Handling
4
; Parameter Input Handling
5
;
5
;
6
; ==========================================================================
6
; ==========================================================================
Line 767... Line 767...
767
SID_PARIN_Set_NOTE_On_NoGate
767
SID_PARIN_Set_NOTE_On_NoGate
768
	;; set new note
768
	;; set new note
769
	;; (temporary stored in TABLAT)
769
	;; (temporary stored in TABLAT)
770
	movff	MIOS_PARAMETER1, TABLAT
770
	movff	MIOS_PARAMETER1, TABLAT
771
771
772
	;; if > 0x7c, play arpeggiator note
772
	;; if >= 0x7c, play arpeggiator note
773
	movlw	0x7c-1
773
	movlw	0x7c-1
774
	cpfsgt	TABLAT, ACCESS
774
	cpfsgt	TABLAT, ACCESS
775
	rgoto SID_PARIN_Set_NOTE_On_NoArp
775
	rgoto SID_PARIN_Set_NOTE_On_NoArp
776
SID_PARIN_Set_NOTE_On_Arp
776
SID_PARIN_Set_NOTE_On_Arp
777
	movff	FSR1L, PRODL		; temporary store FSR1 in PROD[LH]
777
	movff	FSR1L, PRODL		; temporary store FSR1 in PROD[LH]
Line 1206... Line 1206...
1206
	movwf	SID_PAR_IX, BANKED
1206
	movwf	SID_PAR_IX, BANKED
1207
1207
1208
	;; branch depending on relative (bit 7 cleared) or absolute value (bit 7 set)
1208
	;; branch depending on relative (bit 7 cleared) or absolute value (bit 7 set)
1209
	BRA_IFSET MIOS_PARAMETER1, 7, ACCESS, SID_PARIN_SetWT_Abs
1209
	BRA_IFSET MIOS_PARAMETER1, 7, ACCESS, SID_PARIN_SetWT_Abs
1210
SID_PARIN_SetWT_Rel
1210
SID_PARIN_SetWT_Rel
1211
	;; convert signed 7bit to signed 15bit, result in MUL_R_[23]
1211
	;; convert signed 7bit to signed 16bit, result in MUL_R_[23]
1212
	clrf	MUL_R_2, BANKED
1212
	clrf	MUL_R_2, BANKED
1213
	clrc
1213
	clrc
1214
	rlf	MIOS_PARAMETER1, W
1214
	rlf	MIOS_PARAMETER1, W
1215
	addlw	-0x80
1215
	addlw	-0x80
1216
	movwf	MUL_R_3, BANKED
1216
	movwf	MUL_R_3, BANKED
1217
	;; skip modification if offset is 0
1217
	;; skip modification if offset is 0 (for compatibility with old presets, e.g. "A077: Analog Dream 1")
1218
	bz	SID_PARIN_SetWT_End
1218
	bz	SID_PARIN_SetWT_End
1219

1219

1220
	;; get current value -> MIOS_PARAMETER[12]
1220
	;; get current value -> MIOS_PARAMETER[12]
1221
	;; take value from shadow buffer!
1221
	;; take value from shadow buffer!
1222
	bsf	MIOS_PARAMETER3, 2
1222
	bsf	MIOS_PARAMETER3, 2