Subversion Repositories svn.mios

Rev

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

Rev 1229 Rev 1230
Line 1... Line 1...
1
; $Id: main.inc 1229 2018-05-01 10:06:25Z tk $
1
; $Id: main.inc 1230 2018-08-25 23:22:37Z tk $
2
;
2
;
3
; MIOS Application
3
; MIOS Application
4
; MIDIbox SID
4
; MIDIbox SID
5
;
5
;
6
; -> see doc/README.txt for details
6
; -> see doc/README.txt for details
Line 532... Line 532...
532
532
533
	;; if MIDI start: notify start
533
	;; if MIDI start: notify start
534
	movf	IRQ_TMP1, W
534
	movf	IRQ_TMP1, W
535
	xorlw	0xfa
535
	xorlw	0xfa
536
	bz	USER_MIDI_NotifyRx_Start
536
	bz	USER_MIDI_NotifyRx_Start
-
 
537
#if 0
-
 
538
	;; disabled: causes problems with new LogicX SPP handling
537
	xorlw	0xf2 ^ 0xfa		; quick&dirty: reset divider on song position change as well
539
	xorlw	0xf2 ^ 0xfa		; quick&dirty: reset divider on song position change as well
538
	bz	USER_MIDI_NotifyRx_Start ; normaly we should parse the new position as well, but for
540
	bz	USER_MIDI_NotifyRx_Start ; normaly we should parse the new position as well, but for
539
					; most common cases (interaction with DAW) this is sufficient
541
					; most common cases (interaction with DAW) this is sufficient
-
 
542
#endif
540
	rgoto USER_MIDI_NotifyRx_NoStart
543
	rgoto USER_MIDI_NotifyRx_NoStart
541
USER_MIDI_NotifyRx_Start
544
USER_MIDI_NotifyRx_Start
542
	bsf	SID_SE_STATE, SID_SE_STATE_MIDI_CLK_FA_REQ, BANKED
545
	bsf	SID_SE_STATE, SID_SE_STATE_MIDI_CLK_FA_REQ, BANKED
-
 
546
	bcf	SID_SE_STATE, SID_SE_STATE_MIDI_CLK_FC_REQ, BANKED  ; to consider fast back-to-back FC->FA
543
547
544
	;; Auto Mode: immediately switch to slave mode
548
	;; Auto Mode: immediately switch to slave mode
545
	movff	SID_LOCAL_ENS + SID_ENSx_CTRL1, WREG
549
	movff	SID_LOCAL_ENS + SID_ENSx_CTRL1, WREG
546
	btfsc	WREG, SID_ENS_CTRL1_CLK_AUTO
550
	btfsc	WREG, SID_ENS_CTRL1_CLK_AUTO
547
	bsf	SID_STAT, SID_STAT_CLK_SLAVE
551
	bsf	SID_STAT, SID_STAT_CLK_SLAVE
Line 562... Line 566...
562
	movlw	0xfb
566
	movlw	0xfb
563
	cpfseq	IRQ_TMP1, ACCESS
567
	cpfseq	IRQ_TMP1, ACCESS
564
	rgoto USER_MIDI_NotifyRx_NoCont
568
	rgoto USER_MIDI_NotifyRx_NoCont
565
USER_MIDI_NotifyRx_Cont
569
USER_MIDI_NotifyRx_Cont
566
	bsf	SID_SE_STATE, SID_SE_STATE_MIDI_CLK_FB_REQ, BANKED
570
	bsf	SID_SE_STATE, SID_SE_STATE_MIDI_CLK_FB_REQ, BANKED
-
 
571
	bcf	SID_SE_STATE, SID_SE_STATE_MIDI_CLK_FC_REQ, BANKED  ; to consider fast back-to-back FC->FA
567
USER_MIDI_NotifyRx_NoCont
572
USER_MIDI_NotifyRx_NoCont
568
573

569
	;; if MIDI stop: notify stop
574
	;; if MIDI stop: notify stop
570
	movlw	0xfc
575
	movlw	0xfc
571
	cpfseq	IRQ_TMP1, ACCESS
576
	cpfseq	IRQ_TMP1, ACCESS
572
	rgoto USER_MIDI_NotifyRx_NoStop
577
	rgoto USER_MIDI_NotifyRx_NoStop
573
USER_MIDI_NotifyRx_Stop
578
USER_MIDI_NotifyRx_Stop
574
	bsf	SID_SE_STATE, SID_SE_STATE_MIDI_CLK_FC_REQ, BANKED
579
	bsf	SID_SE_STATE, SID_SE_STATE_MIDI_CLK_FC_REQ, BANKED
-
 
580
	bcf	SID_SE_STATE, SID_SE_STATE_MIDI_CLK_FA_REQ, BANKED  ; to consider fast back-to-back FA->FC
-
 
581
	bcf	SID_SE_STATE, SID_SE_STATE_MIDI_CLK_FB_REQ, BANKED  ; to consider fast back-to-back FA->FB
575
USER_MIDI_NotifyRx_NoStop
582
USER_MIDI_NotifyRx_NoStop
576
583
577
	return
584
	return
578

585

579
;; --------------------------------------------------------------------------
586
;; --------------------------------------------------------------------------