Casio RZ-1 System Exclusive (SysEx) Implementation

Discussions about anything analog, digital, MIDI, synth technology, techniques, theories and more.

Casio RZ-1 System Exclusive (SysEx) Implementation

Postby Rasputin » Mon Mar 26, 2018 7:16 pm

Contrary to widely-held beliefs, the RZ1 has SysEx and can save/restore/dump/load both rhythm and sample data over MIDI.

Discuss. :twisted:

Image


Update (6/10/18)

Utilities are now available:

Casio RZ-1 SysEx Bulk Dump Utility v0.50
— use this to capture rhythm and/or sample data from the Casio RZ-1 via SysEx

WAV to SysEx and SysEx to WAV Encoding/Decoding Utility v0.40 (plus bonus SysEx kits)
— sample dumps captured by the bulk dump utility above can be converted to WAVE for editing, etc.
— WAVE files in the proper format can be converted to SysEx files compatible for loading directly to the RZ-1
— rhythm dumps can be converted into binaries
— rhythm binaries can now be converted into SysEx (as of v0.4)

There's not much point to the rhythm data encoder/decoder, but as I'd already developed them for my own use... might as well include them.
Last edited by Rasputin on Sun Sep 09, 2018 9:55 pm, edited 4 times in total.
Rasputin
Active Member
Active Member
 
Posts: 659
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby gmeredith » Thu Mar 29, 2018 8:40 am

Nice! So what is the process??
Casio: FZ1, CZ101, PG380, VZ10M, SK8, SK60, RAP10, DP1 drums, DH100, CDP200, DM100
Yamaha: TX81z, TX802, SHS10, DTXv2
Roland: SH101, DR660, MS1, PM16, TR33
Others: Korg MicroKontrol, ES-1, Alesis MMT8, Emu ESi2000 & card reader, BCR2000, V-Machine
User avatar
gmeredith
Moderator
Moderator
 
Posts: 697
Joined: Mon Oct 17, 2005 5:06 am
Location: Tasmania, Australia
Band: Warning Will Robinson

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby Rasputin » Thu Mar 29, 2018 2:14 pm

Note: This is now figured out to the point of usefulness.

That's really only proof of concept. I only discovered it after disassembling the firmware; same thing with the self-test Easter egg.

Honestly, I was hoping someone would chime in and say, "oh, yeah, this is the way I've always done it. Doesn't everyone know? I mean, it's printed right in the back of manual xyz**..." Because even though apparently it's some long lost secret that disappeared from this planet about three decades ago, someone out there has to have the exact specs from Casio. I know someone has it in their desk drawer or on a 720K floppy somewhere, yet those who remember aren't passing on the knowledge, so...

:whistle:

** incidentally, if anyone has an authentic RZ-1 user manual (not this print a 4MB PDF and bind it nonsense!) then I'd be interested in borrowing it.

Anyway, it's not definitive or official but here are the reverse-engineered specs:

Casio RZ-1 System Exclusive (SysEx) MIDI Implementation

Note: All values are in hex -- for example $F0 or F0h, depending on the notation preferred.

======================================
SEQUENCER MUST INITIATE COMMUNICATION!
======================================

F0 44 01 00 7n zz 00

where n is MIDI channel (0 = channel 1, 1 = ch2, .. E = ch15, F = ch16)

where zz is for RZ-1 to do the following:

10 = MIDI SEND, sample RAM (from RZ-1 to sequencer)
14 = MIDI SEND, rhythm RAM (from RZ-1 to sequencer)
20 = MIDI RECEIVE, sample data (from sequencer to RZ-1)
24 = MIDI RECEIVE, rhythm data (from sequencer to RZ-1)

RZ-1 responds F0 44 01 00 70 30 to any of those four requests -- which is one major mistake by Casio, IMHO.

================================================================
MIDI SEND HANDSHAKING (RZ-1 to sequencer, commands 10 and 14)
================================================================

- Sequencer sends handshake to RZ-1 of intended download: 7n 31 (7n is handshake channel check, 31 is handshake request-to-send command)

- RZ-1 sends reply of nibblized data: h1 l1, h2 l2, .. ..

- If RZ-1 has more data to send then it sends a handshake of: 7n 32 (7n is handshake channel check, 32 is handshake more-to-send reply)

- As needed, sequencer sends another handshake: 7n 31 (7n is handshake channel check, 31 is handshake request-to-send command)

- RZ-1 again sends nibblized data: h1 l1, h2 l2, .. .. for length of RAM dump (or has more data which requires more handshaking)

- Handshakes must proceed until Tx/Rx is done -- only 256 bytes can be sent at a time (not counting SysEx codes or handshaking bytes), but those are nibbles which really only amounts to 128 proper bytes of data! Manually handshaking by sending one 70 31 reply per second seems to work well, but is quite tedious -- an automated script which only replies when the RZ-1 sends its 70 32 handshake would be far superior. The CZ-style trick of flooding the RZ-1 MIDI buffer with handshake acknowledgements tends to stop the RZ-1 prematurely.

- RZ-1 terminates transmission with F7. Sequencer can send either another handshake or F7 to bring RZ-1 out of MIDI SEND mode.

It's recommended to immediately edit the received header accordingly before saving it for later use, so that dumps can easily and properly be played when it comes time to reload them (see section below).

================================================================
MIDI RECEIVE HANDSHAKING (sequencer to RZ-1, commands 20 and 24)
================================================================

- Sequencer SysEx to be sent to the RZ-1 must have the automatically generated header of F0 44 01 00 70 30 removed and replaced with the proper receive request -- either sample or rhythm. Generally F0 44 01 00 70 20 00 for samples and F0 44 01 00 70 24 00 for rhythm, but please reference the formatting guide at the beginning of this document.

Note: The resulting size of a properly edited SysEx sample dump is 33,030 bytes, 15,486 bytes for rhythm.

- Sequencer sends data but the return handshakes have been encoded by the RZ-1 previously during the transmission to the sequencer, so none need to be added as they are automatically played back at the proper points.

- Sequencer and RZ-1 both terminate transmission with F7

Conclusion

It's a really stupid implementation and it makes me want to kick a baby in the face. It's probably going to require something specially coded to make it fully useful, really, because all the SysEx and handshakes need to be stripped and then it has to be un-nibbled** if you're trying to manipulated the sample data. The MT jack encoder/decoder method is still better for loading custom samples, but the SysEx method is much quicker and easier for loading something already backed up -- about 30 seconds. Another benefit of SysEx is it can be initiated from the computer, unlike MT loading which requires manually entering the special MT menu.

** Yes, I know that's the only way you can send such data over MIDI. It's the handshaking and headers that are ridiculous.
Last edited by Rasputin on Sun Jun 10, 2018 9:39 pm, edited 8 times in total.
Rasputin
Active Member
Active Member
 
Posts: 659
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby desmond » Thu Mar 29, 2018 6:19 pm

Yeah, the CZ-101 sysex spec is similarly obtuse - non-standard handshake (sysex strings with no F7 bytes), weirdly encoded envelopes, and that lovely revere-nibble encoding...

Obviously the RZ-1 spec was done by the same (drunk!) Casio engineer!
User avatar
desmond
Active Member
Active Member
 
Posts: 637
Joined: Tue Oct 11, 2005 12:32 pm

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby Rasputin » Thu Mar 29, 2018 11:06 pm

desmond wrote:Yeah, the CZ-101 sysex spec is similarly obtuse - non-standard handshake (sysex strings with no F7 bytes), weirdly encoded envelopes, and that lovely revere-nibble encoding...

Obviously the RZ-1 spec was done by the same (drunk!) Casio engineer!


Yeah, it's definitely a sibling to the CZ-101 -- same mommy, if not daddy, too. Unfortunately, it's too different in application for that fact to be directly helpful.

That's one thing I don't get. Was the RZ-1 just that unpopular comparably? I mean, Casio published an entire Guidebook for MIDI for the CZ series, yet it looks like less than 10 people have ever looked into SysEx on the RZ-1 and 9 of them are dead. :lol:

I don't know if I'm starting an Internet rumor here, but I think there was only one piece of software ever that supported this RZ-1 feature: Opcode Galaxy for classic Mac. And even then, I don't know that for sure. If it really does, then it's buried in the Opcode librarian templates for the CZ series too because there's no separate template available for the RZ-1. No librarian -- Dr. T's X-oR, MOTU UniSyn, et al. -- or standalone software appears to exist for it.

Surprisingly, I don't have an old school Mac, or else I'd try to see how Galaxy tried to talk to the RZ-1.
Rasputin
Active Member
Active Member
 
Posts: 659
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby gmeredith » Fri Mar 30, 2018 12:34 am

Have you tried dumping to a data device instead of a computer? Such as an Alesis Datadisk, Yamaha MDF2 or other device of that same era? My Casio Vz10M was not able to successfully dump to computer because of that similar handshaking bastardry, but it dumped very well to and from my Datadisk. Maybe the hardware data filers have the handshake implementation better sorted?
Casio: FZ1, CZ101, PG380, VZ10M, SK8, SK60, RAP10, DP1 drums, DH100, CDP200, DM100
Yamaha: TX81z, TX802, SHS10, DTXv2
Roland: SH101, DR660, MS1, PM16, TR33
Others: Korg MicroKontrol, ES-1, Alesis MMT8, Emu ESi2000 & card reader, BCR2000, V-Machine
User avatar
gmeredith
Moderator
Moderator
 
Posts: 697
Joined: Mon Oct 17, 2005 5:06 am
Location: Tasmania, Australia
Band: Warning Will Robinson

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby Rasputin » Fri Mar 30, 2018 1:29 am

gmeredith wrote:Have you tried dumping to a data device instead of a computer? Such as an Alesis Datadisk, Yamaha MDF2 or other device of that same era? My Casio Vz10M was not able to successfully dump to computer because of that similar handshaking bastardry, but it dumped very well to and from my Datadisk. Maybe the hardware data filers have the handshake implementation better sorted?


Interesting idea, but no, as I don't have any such things. I never really thought about that approach as I'm (was, at least) fixated on being able to dump into MIDI-OX / Bome's SysEx and then chuck that into an app which will convert to/from raw wave format.

I don't know if there's a way that MIDI-OX can be automated to send the handshake, but something like that is needed from what I can tell. It seems to be timing dependent -- sometimes I get semi-reasonable dumps doing it manually, other times it just sends the first one or two packets and repeats.

Maddeningly close to a great feature... grrr!

I don't even get what Casio intended you to do with it, as it doesn't seem like there's any way to send the received SysEx back to the RZ-1 without unpacking and reconstructing, or otherwise manipulating it. The RZ-1 should have a specific reply which it sends to the sequencer for each different sequencer request, but it just has a generic string which seems entirely useless. Maybe I'm missing something, but it really seems designed to fail without a very specific librarian. Which... you know... could be why there really isn't any support for it.

In other words, when the RZ-1 has been requested to dump to sequencer, the RZ-1 header generated should be the same as the request from the sequencer to upload to the RZ-1. And the handshakes should just be reversed -- each reply should answer the opposite request. But, no -- that would work too smoothly and be far too logical. :verymad:
Rasputin
Active Member
Active Member
 
Posts: 659
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby Rasputin » Fri Mar 30, 2018 9:51 am

I can now confirm that Opcode Galaxy supports the Casio RZ-1 via the Casio CZ librarian, so Opcode considered it part of the "Casio CZ-101/1000, Casio CZ-3000/5000, Casio CZ-1" family and bundled them all together.

Image

I still don't know exactly how it works, but that's near conclusive proof that it can be done dependably. Somehow.

Given that this is the structure of the CZ-5000 Tx/Rx SysEx:

Send Request 1 (patch)
F0 44 00 00 7n 10 dd
Receive Request 1 (patch)
F0 44 00 00 7n 20 dd
Send Request 2 (Sequencer)
F0 44 00 00 7n 14 61
Receive Request 2 (Sequencer)
F0 44 00 00 7n 24 61

Also closely related is the CZ-1 Operation Memory procedure Send/Receive Request 3.

It's clear that it's almost identical except the model ID for the RZ-1 is "01" instead of the CZ model ID of "00" for the 3rd byte in the header. Logical. The 7th byte in the RZ-1 string could be significant, and it might have to be something besides 00 depending on context. Looking at the firmware, it doesn't seem to, but it's pretty arcane, so...
Rasputin
Active Member
Active Member
 
Posts: 659
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby desmond » Fri Mar 30, 2018 2:57 pm

Rasputin wrote:I don't know if I'm starting an Internet rumor here, but I think there was only one piece of software ever that supported this RZ-1 feature: Opcode Galaxy for classic Mac.


To be fair, there weren't that many software editors for drum machines of this time in general - sysex would have been for remote saving/loading of data, rather than "editing" (if you were going to edit the patterns on a computer, you might as well just use a sequencer and the drum machine as an xpander only).

I had a R50 which could dump it's memory out (I would save it in my MMT8 at the time) but again, I don't think I've ever seen an *editor* for those dumps...
User avatar
desmond
Active Member
Active Member
 
Posts: 637
Joined: Tue Oct 11, 2005 12:32 pm

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby Rasputin » Fri Mar 30, 2018 3:33 pm

desmond wrote:To be fair, there weren't that many software editors for drum machines of this time in general - sysex would have been for remote saving/loading of data, rather than "editing" (if you were going to edit the patterns on a computer, you might as well just use a sequencer and the drum machine as an xpander only).


Galaxy only supports dumps for the RZ-1 -- no editing. But I get your point. I just see all these documents and editors for the CZ series and wonder why no one developed (develops?) for the RZ-1 too.

I barely care about dumping rhythm patterns. I mostly just want to be able to import samples via MIDI, and this is the ticket to it. Truth is, I don't even need this feature, I just know it's in there and it bugs me that no one knows how to use it (anymore). It needs to be re-discovered and documented.
Rasputin
Active Member
Active Member
 
Posts: 659
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby Rasputin » Fri Mar 30, 2018 5:19 pm

Success!

Many Bothans died to bring us this information, but no babies were actually kicked in the face, FYI. ;)

High quality drum kits in Casio RZ-1 SysEx form:
https://drive.google.com/open?id=16eeus ... _z4sULkjwt

I used Bome SendSX 1.40 with the following settings (which may or may not matter):

Speed: 989 bytes/s
Sending MIDI = Split & Throttling
Loading Files = Split

Just load and send. That's it. Although it should be noted that the RZ-1 can't be playing back, so it needs to be powered on, hooked to both MIDI in / MIDI out, on Channel 1, and also in its normal "standby" mode with nothing special happening.

It should go without saying that these will erase anything you've already got sampled, so don't be surprised when your sample pads sound different. That's the point.

P.S. The SysEx specs at the front of this post have been updated, for those early to the thread.
Last edited by Rasputin on Thu Apr 26, 2018 5:55 am, edited 1 time in total.
Rasputin
Active Member
Active Member
 
Posts: 659
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby desmond » Fri Mar 30, 2018 7:49 pm

Wait - it sends/receives *samples* via sysex, not just pattern data..?

Wowza!
User avatar
desmond
Active Member
Active Member
 
Posts: 637
Joined: Tue Oct 11, 2005 12:32 pm

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby madtheory » Sat Mar 31, 2018 11:23 am

This is awesome.
User avatar
madtheory
Supporting Member!
Supporting Member!
 
Posts: 5028
Joined: Mon May 01, 2006 12:45 pm
Location: Cork, Ireland
Real name: Tomas Mulcahy
Gear: Pro Tools, Komplete, MIDIQuest, Novation KSR, Casio FZ1+SK5, Korg Legacy, Theremin, Digi Vocalist, Quadravrb+, Kaoss Pads1+2, SPD11, OB Cyclone.
Band: Minim

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby Sonus » Sat Mar 31, 2018 12:49 pm

Thanks! RZ-1 banger drums syx converted to 20kHz 8-bit signed wav, 0.8192 seconds sample time:

Image
Sonus
Newbie
Newbie
 
Posts: 58
Joined: Sun May 31, 2015 5:33 pm

Re: Casio RZ-1 System Exclusive (SysEx) Implementation

Postby Rasputin » Sat Mar 31, 2018 1:49 pm

Sonus wrote:Thanks! RZ-1 banger drums syx converted to 20kHz 8-bit signed wav, 0.8192 seconds sample time


Did you do that via the MT jack decoder tool, or actually decode the SysEx? Very interested if it was the second option, but still surprised either way!

:headbang:
Rasputin
Active Member
Active Member
 
Posts: 659
Joined: Thu Jul 21, 2016 4:52 am

Next

Return to General Synthesizers

Who is online

Users browsing this forum: Bing [Bot] and 16 guests