Roland U-220 SysEx, memory addressing [solved]
9 Jul 2020, 04:21Good day.
I am working on a tool to easily export, import and manipulate settings on the U-220 unit. However, while trying to decode the Timbre and Patch settings, I think I have ran into some vagueness in the owner's manual regarding the SysEx message format and the addressing scheme that is used.
Either my interpretation, or the owner's manual is flawed. Over the recent days I have been searching long and hard to find any clues, but to no avail, and I'm hoping that some people in here may know the answer.
Some more background first.
To develop my tool, I have made a Bulk Dump of the actual device to a file. My tool then decodes the SysEx messages in that file into an internal memory buffer to reconstruct it, and then I decode from that memory area.
This works fine for the "Setup Parameter" area at the start, but not so great for other things.
For example, the Timbre area. The owner's manual describes this in the "Bulk Dump Area" contents. The Timbre area has a starting address of "0x02 00 00", that it is 0x4000 bytes long, and that it ends at "0x02 3F 7F".
Every individual Timbre setting itself is 0x20 bytes long. This would imply that I should find them the following offsets:
- 0x02 00 00
- 0x02 00 20
- 0x02 00 40
- 0x02 00 60
- ... and so on
However -- they do not. I find them at "0x02 00 00", "0x02 00 20" and then continues at "0x02 01 00", "0x02 01 20" and so on.
Similarly, the Patch area at "0x03 00 00" to "0x03 4F 7F", with individual Patch sizes of 0x50 bytes, I find at "0x03 00 00", "0x03 01 10", "0x03 02 20" and so on.
If I peak in the raw .SYX file, this does seem to make sense, as I see the DS1 messages that all have a payload size of 128 bytes. These 128 MIDI bytes decode to an actual buffer of 64 bytes actual data (0x40 bytes in hex).
This all seems to suggest that the addressing points to blocks of 64 bytes. That would all make sense.
But then, in the manual, the ending address of the Timbre area is what throws me off: it mentions "0x02 3F 7F" but that could then not at all be a valid address. Also, the 0x4000 bytes length seems incorrect -- there would be only (128 timbres at 64 bytes per timbre = 8192, which is 0x2000 bytes) in that area.
Does the addressing scheme that is used actually point to blocks of 64 bytes and not 128, and I should not let the 0x7F in the manual confuse me? Or am I doing something wrong?
Please note that English is not my main language, so I hope this all makes sense. :)
Thanks in advance for any replies!
Edited to add: After some more consideration, and importantly, having looked at the U-220 factory reset SysEx files I could find on the net (which also send 128 nibbles / 64 bytes and never address anything above an offset of 0x00), I have come to the conclusion that my interpretation must be correct and that these parameter values *are* mapped to blocks of 64 bytes.
I am working on a tool to easily export, import and manipulate settings on the U-220 unit. However, while trying to decode the Timbre and Patch settings, I think I have ran into some vagueness in the owner's manual regarding the SysEx message format and the addressing scheme that is used.
Either my interpretation, or the owner's manual is flawed. Over the recent days I have been searching long and hard to find any clues, but to no avail, and I'm hoping that some people in here may know the answer.
Some more background first.
To develop my tool, I have made a Bulk Dump of the actual device to a file. My tool then decodes the SysEx messages in that file into an internal memory buffer to reconstruct it, and then I decode from that memory area.
This works fine for the "Setup Parameter" area at the start, but not so great for other things.
For example, the Timbre area. The owner's manual describes this in the "Bulk Dump Area" contents. The Timbre area has a starting address of "0x02 00 00", that it is 0x4000 bytes long, and that it ends at "0x02 3F 7F".
Every individual Timbre setting itself is 0x20 bytes long. This would imply that I should find them the following offsets:
- 0x02 00 00
- 0x02 00 20
- 0x02 00 40
- 0x02 00 60
- ... and so on
However -- they do not. I find them at "0x02 00 00", "0x02 00 20" and then continues at "0x02 01 00", "0x02 01 20" and so on.
Similarly, the Patch area at "0x03 00 00" to "0x03 4F 7F", with individual Patch sizes of 0x50 bytes, I find at "0x03 00 00", "0x03 01 10", "0x03 02 20" and so on.
If I peak in the raw .SYX file, this does seem to make sense, as I see the DS1 messages that all have a payload size of 128 bytes. These 128 MIDI bytes decode to an actual buffer of 64 bytes actual data (0x40 bytes in hex).
This all seems to suggest that the addressing points to blocks of 64 bytes. That would all make sense.
But then, in the manual, the ending address of the Timbre area is what throws me off: it mentions "0x02 3F 7F" but that could then not at all be a valid address. Also, the 0x4000 bytes length seems incorrect -- there would be only (128 timbres at 64 bytes per timbre = 8192, which is 0x2000 bytes) in that area.
Does the addressing scheme that is used actually point to blocks of 64 bytes and not 128, and I should not let the 0x7F in the manual confuse me? Or am I doing something wrong?
Please note that English is not my main language, so I hope this all makes sense. :)
Thanks in advance for any replies!
Edited to add: After some more consideration, and importantly, having looked at the U-220 factory reset SysEx files I could find on the net (which also send 128 nibbles / 64 bytes and never address anything above an offset of 0x00), I have come to the conclusion that my interpretation must be correct and that these parameter values *are* mapped to blocks of 64 bytes.