chriss Posted June 26, 2005 Report Share Posted June 26, 2005 Hi all,at the moment i am designing the frontpanel for the opl3 synth, and i am asking if it´s possible to change the buttons for the instrument / operator selection. my idea is to have for instrument 1-4 and operator 1-4 a dedicated button, so instead of five buttons , eight buttons.i know that i need three more digital inputs and that means an extra Din chip, but that would be ok for me.since i don´t build anything yet, i don´t know if this has any advantages in handling the synth, but it would defenitly better fit in my frontpanellayout.thanks chriss Quote Link to comment Share on other sites More sharing options...
TK. Posted June 27, 2005 Report Share Posted June 27, 2005 Hi Chriss,this should be possible by changing the CS_MENU_BUTTON_InsOP_Cont in "cs_menu_buttons.inc" . Currently it either moves the pointer to CS_MENU_SELECTED_INS_FLAGS or CS_MENU_SELECTED_OP_FLAGS into FSR0 depending on the CS_MENU_MODE_INS_OP flag... Quick change: add four additional OP button functions and set the CS_MENU_MODE_INS_OP flag there. Clear this flag within the instrument button functionsBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
chriss Posted June 28, 2005 Author Report Share Posted June 28, 2005 hi thorsten,cool that this is possible.as always i don´t know what to do exactly....i just pasted the original code here:CS_MENU_BUTTON_InsOP1 movlw 1 << 0 rgoto CS_MENU_BUTTON_InsOP_Cont CS_MENU_BUTTON_InsOP2 movlw 1 << 1 rgoto CS_MENU_BUTTON_InsOP_Cont CS_MENU_BUTTON_InsOP3 movlw 1 << 2 rgoto CS_MENU_BUTTON_InsOP_Cont CS_MENU_BUTTON_InsOP4 movlw 1 << 3 ;; rgoto CS_MENU_BUTTON_InsOP_ContCS_MENU_BUTTON_InsOP_Cont movwf TMP1 ;; pointer to _FLAGS register which should be modified in FSR0 lfsr FSR0, CS_MENU_SELECTED_INS_FLAGS btfsc CS_MENU_MODE, CS_MENU_MODE_INS_OP lfsr FSR0, CS_MENU_SELECTED_OP_FLAGSand now i would put in four extra Op_buttons like this:CS_MENU_BUTTON_OP1 for example.but how to set the CS_MENU_MODE_INS_OP flag there? like this?CS_MENU_BUTTON_OP1 lfsr FSR0, CS_MENU_SELECTED_OP_FLAGS rgoto CS_MENU_MODE_INS_OP and how can i clear the flag within the instrument button functions? like this?lfsr FSR0, CS_MENU_SELECTED_INS_FLAGS btfsc CS_MENU_MODE, CS_MENU_MODE_INS_OPwhen i do that i get following error:MIDIBO_FM_V1_0 MODIFIED\MACROS.H 161 : Argument out of range (-6901 not between -1024 and 1023)MIDIBO_FM_V1_0 MODIFIED\MACROS.H 161 : Argument out of range (-6904 not between -1024 and 1023)MIDIBO_FM_V1_0 MODIFIED\MACROS.H 161 : Argument out of range (-6907 not between -1024 and 1023)thankschriss Quote Link to comment Share on other sites More sharing options...
TK. Posted June 29, 2005 Report Share Posted June 29, 2005 Hi Chriss,undo your changes and add following lines to cs_menu_button.incCS_MENU_BUTTON_Ins1 bcf CS_MENU_MODE, CS_MENU_MODE_INS_OP movlw 1 << 0 rgoto CS_MENU_BUTTON_InsOP_ContCS_MENU_BUTTON_Ins2 bcf CS_MENU_MODE, CS_MENU_MODE_INS_OP movlw 1 << 1 rgoto CS_MENU_BUTTON_InsOP_ContCS_MENU_BUTTON_Ins3 bcf CS_MENU_MODE, CS_MENU_MODE_INS_OP movlw 1 << 2 rgoto CS_MENU_BUTTON_InsOP_ContCS_MENU_BUTTON_Ins4 bcf CS_MENU_MODE, CS_MENU_MODE_INS_OP movlw 1 << 3 rgoto CS_MENU_BUTTON_InsOP_ContCS_MENU_BUTTON_OP1 bsf CS_MENU_MODE, CS_MENU_MODE_INS_OP movlw 1 << 0 rgoto CS_MENU_BUTTON_InsOP_ContCS_MENU_BUTTON_OP2 bsf CS_MENU_MODE, CS_MENU_MODE_INS_OP movlw 1 << 1 rgoto CS_MENU_BUTTON_InsOP_ContCS_MENU_BUTTON_OP3 bsf CS_MENU_MODE, CS_MENU_MODE_INS_OP movlw 1 << 2 rgoto CS_MENU_BUTTON_InsOP_ContCS_MENU_BUTTON_OP4 bsf CS_MENU_MODE, CS_MENU_MODE_INS_OP movlw 1 << 3 rgoto CS_MENU_BUTTON_InsOP_Cont[/code]Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
chriss Posted July 3, 2005 Author Report Share Posted July 3, 2005 thanks thorsten,did try it with the MBsid and it works.just put in the OPbuttons into the cs_menu_io_tables.inc and assigned the 5th DIN register to them, after setting the ;; initialize the shift registers movlw 0x04 ; use up to 4 shift registers to ;; initialize the shift registers movlw 0x05 ; use up to 5 shift registerseverthing seems to workthanks again, now i can go one building my frontpanelchriss Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.