Joined: Oct 16, 2008
Audio files: 52
|Posted: Mon Feb 17, 2014 3:12 am Post subject:
Machine Monitor for Waldorf Q/Q+
|Warning: No useful content inside, at least - not musically useful!
I know, I know, synthesizers are meant to be played, but many months ago I was intrigued by those Waldorf Q BIN system exclusive files mentioned in some places but without additional info of any kind. Fortunately, I actually have one real BIN file. It is Flash Erase SysEx received from Waldorf some 10+ years ago, as a solution to "Flash hopeless full" error message on my Q. At that time Q OS didn't have the ability to erase the complete flash memory and this SyxEx file was needed for this.
Obviously, this is some kind of program which, after being sent to the Q, actually executes on the synthesizer itself, so I decided to investigate all this further ...
First, I had to unpack BIN file to get the real binary content (SysEx data is 7-bit only and some kind of packing is needed for 8-bit values). Fortunately, Waldorf didn't use a very advanced algorithm for this. I was very happy when I saw character strings like "ERASE DATA FLASH?" inside a binary file, so I knew that I am on a right way.
Second, I took a disassembler and disassembled the binary file. As expected and hoped, some familiar Motorola 680x0 code shows up
Then I decided to see if the same packing has been used for BOOT/OS files and, yes, they are packed in the same way, so I could disassemble Q BOOT and OS. OK, there is the usual problem of dividing between code and data (because it is mixed), but this don't concern me too much, as I can manually fix it where needed. The other problem is that 56303 code has been contained in the same OS file and, at the moment, I cannot exactly locate and disassemble it. The third problem is that most of the OS has been written in C and compiled code is harder to analyze than assembled code.
But OK, all this was enough to understand some inner workings, including global memory map, some system locations (LCD etc.) and routines (display, keyboard scan, MIDI sending, etc.), as well as BIN files execution. When receiving a BIN, BOOT code unpacks it, store it to RAM beginning at the address 10000 hex, and finally just executes JSR 0x10000. BIN code then do what it has to do and resets the synthesizer.
So, I came to the idea to write some programs of my own and finally I developed a simple monitor program which, after being sent to the Q, can be used to browse through the memory, show some registers and stack, and dump a whole banks of RAM/ROM via MIDI to the computer (I need this to be able to search through the RAM).
This QMonitor program can be downloaded here:
Just send Monitor.syx to Waldorf Q and you'll have the following commands available (Key ... Command):
1 ... Address+$10
2 ... Address-$10
3 ... Address+$100
4 ... Address-$100
5 ... Address+$1000
6 ... Address-$1000
7 ... Address+$10000
8 ... Address-$10000
9 ... Address+8
0 ... Address-8
Seq Edit ... Show SP/SR Registers
Seq Select ... Show Stack
Start/Stop ... Dump Current Block over MIDI
Power ... Reboot
($ means hexadecimal)
Disclaimer #1: This program doesn't have any real usability - it was developed just for fun.
Disclaimer #2: If you, despite Disclaimer #1, decided to use it for some unknown reason then, please, keep in mind that I am not responsible for any possible damage caused by this program. It worked correctly on a few Waldorf Qs of mine and on Q+ while I owned it, but if something goes wrong I am not responsible for this ... Use at your and only your own risk!