Subversion Repositories svn.mios

Rev

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

Rev 748 Rev 878
Line 1... Line 1...
1
; $Id: sid_se.inc 748 2009-03-13 21:46:31Z tk $
1
; $Id: sid_se.inc 878 2010-01-02 15:40:58Z tk $
2
;
2
;
3
; MIDIbox SID
3
; MIDIbox SID
4
; Software Synthesizer Engine
4
; Software Synthesizer Engine
5
;  
5
;  
6
; Activate this #define to measure the performance with a scope
6
; Activate this #define to measure the performance with a scope
Line 257... Line 257...
257
	andlw	0x3f
257
	andlw	0x3f
258
	skpnz
258
	skpnz
259
	incf	SID_CLK_REQ_CTR, F, BANKED
259
	incf	SID_CLK_REQ_CTR, F, BANKED
260
#endif
260
#endif
261
261
262
	;; now determine master/slave flag depending on environment setup
262
	;; now determine master/slave flag depending on ensemble setup
263
	movff	SID_LOCAL_ENS + SID_ENSx_CTRL1, WREG
263
	movff	SID_LOCAL_ENS + SID_ENSx_CTRL1, WREG
264
	BRA_IFSET WREG, SID_ENS_CTRL1_CLK_AUTO, ACCESS, SIDSE_Clk_ModeAuto
264
	BRA_IFSET WREG, SID_ENS_CTRL1_CLK_AUTO, ACCESS, SIDSE_Clk_ModeAuto
265
	BRA_IFSET WREG, SID_ENS_CTRL1_CLK_SLAVE, ACCESS, SIDSE_Clk_ModeSlave
265
	BRA_IFSET WREG, SID_ENS_CTRL1_CLK_SLAVE, ACCESS, SIDSE_Clk_ModeSlave
266
SIDSE_Clk_ModeMaster
266
SIDSE_Clk_ModeMaster
267
	bcf	SID_STAT, SID_STAT_CLK_SLAVE
267
	bcf	SID_STAT, SID_STAT_CLK_SLAVE
Line 789... Line 789...
789
	movff	PRODH, PRODL	; new pointer in PRODL
789
	movff	PRODH, PRODL	; new pointer in PRODL
790
790
791
SIDSE_Arp_NewNote_Down_Cont
791
SIDSE_Arp_NewNote_Down_Cont
792
SIDSE_Arp_NewNote_Up
792
SIDSE_Arp_NewNote_Up
793
793
794
	;; now check for oneshot mode: if note is 0, or if note and oct counter is 0, stop here
794
	;; now check for oneshot mode: if note is 0, or if note counter and oct counter is 0, stop here
795
	movlw	SID_Ix_Vx_ARP_SPEED_DIV
795
	movlw	SID_Ix_Vx_ARP_SPEED_DIV
796
	BRA_IFCLR PLUSW0, SID_I_V_ARP_SPEED_DIV_ONESHOT, ACCESS, SIDSE_Arp_NewNote_NoOneShot
796
	BRA_IFCLR PLUSW0, SID_I_V_ARP_SPEED_DIV_ONESHOT, ACCESS, SIDSE_Arp_NewNote_NoOneShot
797
SIDSE_Arp_NewNote_OneShot
797
SIDSE_Arp_NewNote_OneShot
798
	BRA_IFSET SID_SE_STATE, SID_SE_STATE_ARP_FIRST_NOTE_REQ, BANKED, SIDSE_Arp_NewNote_NoOneShot
798
	BRA_IFSET SID_SE_STATE, SID_SE_STATE_ARP_FIRST_NOTE_REQ, BANKED, SIDSE_Arp_NewNote_NoOneShot
799
	movf	PRODL, W
799
	movf	PRODL, W
Line 2890... Line 2890...
2890
SIDSE_Hlp_ENV_GetBendedValue_Crv
2890
SIDSE_Hlp_ENV_GetBendedValue_Crv
2891
	;; copy current counter value to IRQ_TMP2
2891
	;; copy current counter value to IRQ_TMP2
2892
	movlw	SID_ENVx_CTR_H
2892
	movlw	SID_ENVx_CTR_H
2893
	movff	PLUSW1, IRQ_TMP2
2893
	movff	PLUSW1, IRQ_TMP2
2894
2894
2895
	;; rightshift IRQ_TMP3 (7bit value range)
2895
	;; rightshift rate in IRQ_TMP3 (8bit -> 7bit value range)
2896
	clrc
2896
	clrc
2897
	rrf	IRQ_TMP3, F
2897
	rrf	IRQ_TMP3, F
2898
2898
2899
	;; feedback: calculate ABS8(CURVE) * ENV_x_CTR_H
2899
	;; feedback: calculate ABS8(CURVE) * ENV_x_CTR_H
2900
	movf	IRQ_TMP1, W		; get absolute value of curve parameter
2900
	movf	IRQ_TMP1, W		; get absolute value of curve parameter