Jump to content

Recommended Posts

Posted

I've been working on this for a couple of weeks, but I've tried everything I can think of for now.

I'm using the MidiboxLC application with 2 2x40 CLCD displays.  Host program is Sonar, but I had the same result with a friend's PC using Cubase.

Also, I'm using the Sonar patch to the lc_mproc.inc file referenced in the topic "Midibox LC and Sonar Question".

I have tested the 2 LCDs and they appear to be working correctly.  I've tried the sysex commands that allow writes to the screen and they work.  

I've also tried version commands:

f0 00 00 66 14 13 f7

... and I get the proper response.

I've even written gibberish to the LCD using the MTC Write command:

f0 00 00 66 14 10 ..... f7

However, from what I can tell, the midibox is not responding to the Write_LCD command:

f0 00 00 66 14 12 .... f7

There are definately changes in the Sonar mod file, lc_mproc.inc, that appear to relate to this command that are not in the file in 1.4 MidiboxLC distribution.  Unfortunately, when I modify the Sonar mod file to match the original except for the MC Query addition, the file won't compile properly.

Also, I tried the GPC mode and MF Cali mode and the display seemed to work fine.

Also, I had another problem early on that related to the lc_init.inc file.  I believe the line:

#if LCD_USE_SECOND

... should read:

#if LCD_USE_SECOND == 1

... in order to get the 2 LCDs to display properly.  How do I get this suggestion checked out and the file changed if necessary?

Thanks.

xile

Posted

Hi,

the result of

#if LCD_USE_SECOND

and

#if LCD_USE_SECOND == 1

is the same, so this cannot be the reason.

The only changes of the modified lc_mproc.inc and the original lc_mproc.inc of v1.4 are:

[avatar@britannia mblc_sonar_mod]$ diff -c /mnt/data/mios_apps/release/midibox_lc_v1_4/lc_mproc.inc lc_mproc.inc 
*** /mnt/data/mios_apps/release/midibox_lc_v1_4/lc_mproc.inc  2003-09-29 14:22:28.000000000 +0200
--- lc_mproc.inc        2004-03-29 01:43:07.000000000 +0200
***************
*** 360,365 ****
--- 360,369 ----
        bz      LC_MPROC_Action_Query
  
        movf    LC_MPROC_ACTION, W
+       xorlw   0x1a
+       bz      LC_MPROC_Action_MCQuery
+ 
+       movf    LC_MPROC_ACTION, W
        xorlw   0x02
        bz      LC_MPROC_Action_HostReply
  
***************
*** 373,379 ****
  
        movf    LC_MPROC_ACTION, W
        xorlw   0x12
!       bz      LC_MPROC_Action_WriteLCD
  
        movf    LC_MPROC_ACTION, W
        xorlw   0x13
--- 377,384 ----
  
        movf    LC_MPROC_ACTION, W
        xorlw   0x12
!       skpnz
!       rgoto   LC_MPROC_Action_WriteLCD
  
        movf    LC_MPROC_ACTION, W
        xorlw   0x13
***************
*** 427,432 ****
--- 432,463 ----
        rgoto   LC_MPROC_ActionFinished
  
  ;; --------------------------------------------------------------------------
+ ;;  MIDI Action: MC Query (undocumented)
+ ;; --------------------------------------------------------------------------
+ LC_MPROC_Action_MCQuery
+       ;; wait until sysex footer (F7) has been received
+       movlw   0xf7
+       IFNEQ   LC_MPROC_IN, ACCESS, rgoto LC_MPROC_SysExCheck_End
+ 
+       ;; send SysEx header
+       call    LC_MPROC_Send_SysExHeader
+ 
+       ;; send reply
+       movlw   0x1b
+       call    MIOS_MIDI_TxBufferPut
+ 
+       ;; send dummy byte (seems to work)
+       movlw   0x42
+       call    MIOS_MIDI_TxBufferPut
+ 
+       ;; send of SysEx footer
+       movlw   0x01            ; (independend from merger state)
+       call    LC_MPROC_Send_SysExFooter
+ 
+       ;; finish Action
+       rgoto   LC_MPROC_ActionFinished
+ 
+ ;; --------------------------------------------------------------------------
  ;;  MIDI Action: LC Host Reply
  ;; --------------------------------------------------------------------------
  LC_MPROC_Action_HostReply

so: the new LC_MPROC_Action_MCQuery

and a change for the LC_MPROC_Action_WriteLCD branch (distance between the "bz" and the function was > 128 bytes, therefore a rgoto has to be used).

It should work if you just overwrite the old lc_mproc.inc with the modified one. Maybe you've modified the source code in a way which prevents the LC_MPROC_Action_WriteLCD function from being called...

Best Regards, Thorsten.

Posted

So, to make one of these work with Sonar, theres a recompile involved?

Any chance of updating the code that needs to be flashed (or downloaded) that's available directly from the site?

I haven't gotten familiar enough with the code yet to tackle a re-compile!

Posted

I'll help you once I get a working config.  

I'm about to start over with a clean build based on Thorsten's feedback.

We'll get Sonar working with the Midibox LC!

xile

Posted

Well, the host messages are now displaying properly.  I started over with a clean build, but that wasn't the problem.  It turns out that that combination of MidiOx and my USB midi interface seem to be the problem.  When I bypassed MidiOx, the USB interface would work, even though it wasn't perfect all the time.  

I have another midi interface and it's working properly, even with MidiOx.

xile

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...