User Tools

Site Tools


upgrade_cs_step_a_mbsidv1_to_have_shift_function_on_menu_button

Menu Button as Shift button

If you had an old mbSIDv1 with a CS Step A (5 select button, 1 rotary, and 1 menu button) and you have upgrade it to v2, you can simply have the useful Shift function on menu button when the main menu is displayed.

Step-by-Step description

  • Open cs_menu_button.inc, it's located in src directory of midibox_sid_v2_0_rcXX.
  • Find this function CS_MENU_BUTTON_Exec_NoStartup. It's just under CS_MENU_BUTTON_Exec.
  • Add this lines:
    	;; special condition if main menu displayed and menu button pressed, go to shif function
    	btfsc	CS_MENU, 7
    	goto	CS_MENU_BUTTON_Shift
  • like shown here:
    CS_MENU_BUTTON_Exec_NoStartup
    	;; activate/deactivate menu button function
    	bcf	CS_MENU_MODE, CS_MENU_MODE_MENU_PRESSED
    	btfss	MIOS_PARAMETER2, 0; if button is pressed
    	bsf	CS_MENU_MODE, CS_MENU_MODE_MENU_PRESSED
     
    	;; special condition if main menu displayed and menu button pressed, go to shif function
    	btfsc	CS_MENU, 7
    	goto	CS_MENU_BUTTON_Shift
     
    	;; do nothing if button has been depressed
    	btfsc	MIOS_PARAMETER2, 0
    	return
  • Open cs_menu.inc
  • Find this function CS_MENU_Exec
  • Comment this lines to avoid conflict with the previous code insert:
    	;; exit if we are in main menu
    	btfsc	CS_MENU, 7
    	return
  • like shown here:
    CS_MENU_Exec
    	;; exit if SID not available
    	btfss	CS_STAT, CS_STAT_SID_AVAILABLE
    	return
     
    	;; clear CS_SELECT_CTR (so that new message appears immediately)
    	clrf	CS_SELECT_CTR
     
    	;; clear refresh item counter --- ensures that the whole display will be refreshed
    	clrf	CS_MENU_REFRESH_ITEM_CTR
     
    	;; exit if we are in main menu
    	;; btfsc	CS_MENU, 7
    	;; return
     
    	;; execute function
    	;; calc pointer to function: CS_MENU_TABLES + (CS_MENU*CS_MENU_T_ENTRY_LEN) + CS_MENU_ENTRY_EXEC_OFFSET
    	movlw	CS_MENU_T_ENTRY_EXEC_OFFSET
    	call	CS_MENU_GetMenuTablesPtr
    	goto	MIOS_HLP_IndirectJump
    • Now recompile the setup_*.asm
    • Send it to your mbSID via MIOSStudio
    • You’re all done!

In this way the encoder slow function pressing shift (menu) button work only if you are in main menu, and than turn any CS encoder. Since turning encoder jump the lcd to the referred parameter's menu, the slow function remain set-on since you come back to main menu. The slow encoder speed, pushing shift after (during) the encoder movement do not work.

upgrade_cs_step_a_mbsidv1_to_have_shift_function_on_menu_button.txt · Last modified: 2011/11/29 16:56 by smashtv