Jump to content

[solved] mbSID v2: Adding a menu page


nILS

Recommended Posts

I'm trying to add a page to the men structure. That page is supposed to have 5 entries. Filter Cutoff, Filter Resonance, NOP, LFO Rate, LFO Depth. Therefore I created this table:

; ==========================================================================
;  The combined FIL/LFO menu
; ==========================================================================
CS_MENU_TABLE_L_FL
db (CS_MENU_TABLE_L_FL_End-CS_MENU_TABLE_L_FL)/CS_MENU_ENTRY_LEN, 0x00

;;              Register (00=dummy)        |<->|  max  print ix          exec ix          parameter transfer
CS_MENU_ENTRY SID_Ix_L_Fx_CUTOFF_L,      "Cut", 0xfff, PRINT_Fx_CUTOFF,  EXEC_SELPAR,    R2PP2R_Fx_CUTOFF
CS_MENU_ENTRY SID_Ix_L_Fx_RESONANCE,      "Res", 0x0ff, PRINT_Fx_RESON,  EXEC_SELPAR,    R2PP2R_Fx_RESON
CS_MENU_ENTRY 0x00,                      " | ", 0x000, PRINT_NOP,     EXEC_NOP,        R2PP2R_NOP
CS_MENU_ENTRY SID_Ix_LFOx_RATE,          "Rte", 0x0ff, PRINT_LFOx_RATE,  EXEC_SELPAR,    R2PP2R_NOP
CS_MENU_ENTRY SID_Ix_LFOx_DEPTH,          "Dep", 0x0ff, PRINT_LFOx_PMDEC8,EXEC_SELPAR,    R2PP2R_LFOx
CS_MENU_TABLE_L_FL_End[/code] Added the entry to the CS_MENU_TABLES_L:
[code]CS_MENU_TABLES_L
;;              pointer to table      par. button pressed      exec button pressed  page nam  var                    max  print function
;; ...
CS_MENU_T_ENTRY CS_MENU_TABLE_L_FL,  CS_MENU_Page_Parameters, CS_MENU_EXEC_GoToRoot,  "F/L", 0,   0x00, PRINT_NOP
;; ...
Gave it an ID:
CS_MENU_L_FL 	EQU	0x0f
Added it to the ID list:
CS_MENU_TABLES_IDS
;;      lead          bassline      drum          multi
;; ...
db  CS_MENU_L_FL, CS_MENU_ROOT, CS_MENU_ROOT, CS_MENU_ROOT[/code]

So far so good. It shows up in the main menu. I can't really select it though and it completely screws up all the other menus (menu buttons select the item to their left...).

Any ideas?

Link to comment
Share on other sites

It's strange that it shows up in the main menu without an entry in CS_MENU_TABLE_L_ROOT - or did you forget to mention this?

No, it was not in there yet  :-\

I added it to the list and that fixed the problem.

	CS_MENU_T_ENTRY	CS_MENU_TABLE_L_FL,   CS_MENU_Page_Parameters, CS_MENU_EXEC_GoToRoot,   "F/L", 0,                     0x00, PRINT_NOP

Thanks, TK!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...