Page 1 of 1

Casio RZ-1 Custom Firmware

PostPosted: Wed Sep 13, 2017 10:08 pm
by Rasputin
I've been (very casually) mulling over the idea of making custom firmware for the RZ-1.

Features Wish List:

-- Being able to lock the "Accent" button so that all drum hits have extra emphasis by default. You can easily add emphasis if you're triggering by MIDI (velocity of 97-127), but if you're live drumming then you either have to hold down the Accent button (losing a hand in the process) or shove something in the button to keep it stuck down (jamming in a guitar pick works) -- not graceful.

-- Being able to change the MIDI notes corresponding to each pad. Maybe you want the drums to match General MIDI, maybe something else.

-- MIDI Sample Dump Standard (SDS); This would be hugely useful. Although an MT jack sideloading method exists, MIDI would be way more convenient.

Anyone else have any ideas or gripes about the RZ-1 that should be addressed? I think the MIDI notes issue would be very easy to hardcode into whatever was desired, but it would be significantly more difficult to make it adjustable on-the-fly and stored in NVRAM so it is recalled after reboot / power off.

Again, just an idea I'm toying with and something that isn't that likely to happen.

Re: Casio RZ-1 Custom Firmware

PostPosted: Wed Sep 13, 2017 10:58 pm
by madtheory
To somehow magically be able to change the pitch of each sound independently, or even do that on the fly with an envelope, or even have it as programmable per step in a pattern?

Re: Casio RZ-1 Custom Firmware

PostPosted: Thu Sep 14, 2017 12:11 pm
by sneakthief
Somewhat related: is it just me, or are there some versions of the RZ-1 where you can change the pattern while playing and others where you can't?

Re: Casio RZ-1 Custom Firmware

PostPosted: Thu Sep 14, 2017 2:05 pm
by Walter Ego
Rasputin wrote:-- MIDI Sample Dump Standard (SDS); This would be hugely useful. Although an MT jack sideloading method exists, MIDI would be way more convenient.


Big +1 on this. I've read about the sideloading method. Way above my paygrade.

Re: Casio RZ-1 Custom Firmware

PostPosted: Thu Sep 14, 2017 4:56 pm
by madtheory
Just read about the sideloader hacking Rasputin. That is very cool!

Re: Casio RZ-1 Custom Firmware

PostPosted: Mon Oct 30, 2017 9:42 am
by elsongs
I used to own an RZ-1 like 30 years ago. I never used the standard kick/snare and only used the sample pads for those sounds :) My biggest complaint was lack of tuning and the fact that the thing gave off this faint high-pitched buzz/whine from the audio outs.

Re: Casio RZ-1 Custom Firmware

PostPosted: Thu Nov 09, 2017 4:10 pm
by Rasputin
The buzz is a common problem. It's the inverter for the backlight (which probably doesn't even still work anyway!)

Here's how to upgrade to an LED LCD display, effectively killing two birds with one stone:
http://r-massive.cellarseer.com//?s=casio+rz-1

Re: Casio RZ-1 Custom Firmware

PostPosted: Thu Jan 11, 2018 5:09 pm
by Rasputin
sneakthief wrote:Somewhat related: is it just me, or are there some versions of the RZ-1 where you can change the pattern while playing and others where you can't?


Does anyone actually know about this? Or have any info on different revisions of the ROMs? Heck, does anyone even have an independent EPROM read of their RZ-1?

The only OS firmware for the RZ-1 (that I'm aware of) on the 'Net is one that came from me, so I'm kind of stuck with what I've got to work with -- just my own personal EPROM rip.

Project Update

So... I've revisited this project and (after way too many hours) have gotten to the point where I am quite confident I can make this (seemingly) simple accent hack. I don't know if it's clear where I was going with this, but the concept is that the ACCENT button would turn into a "ghost note" button. In other words, everything would be full velocity by default, ACCENT would actually de-accent, and MUTE would well... still mute.

Pretty trivial to implement, if you already know how the firmware is laid out. As they say: Everything is easy, once you know how.

Once I get that working then I might dig into the sample xfer / rhythm backup via MIDI thing. As a luxury I could try to add separate MIDI channels for Tx/Rx instead of them being tied together. But I shouldn't get ahead of myself.

Re: Casio RZ-1 Custom Firmware

PostPosted: Sun Jan 14, 2018 5:15 pm
by Rasputin
Not exactly firmware related, but I noticed an omission in the Casio RZ-1 Service Manual. On page 27, they list the key scan matrix with the key common signals (KC0~KC7) and the KI lines (KI0~KI5), but--for whatever reason--there is no KC4 shown.

I'm fairly confident KC4 should be thus [this would be left-to-right like their switch matrix table]:

KI 5 - CHAIN/BEAT
KI 4 - INSERT/AUTOCOMP
KI 3 - DELETE
KI 2 - EDIT/RECORD
KI 1 - SONG
KI 0 - PATTERN

Might be handy to know while troubleshooting the TC40H368 chip if you've got multiple keys out at once. You know, for that one person on the planet who has that problem and finds this post... :roll:

Re: Casio RZ-1 Custom Firmware

PostPosted: Tue Mar 06, 2018 12:13 am
by Rasputin
PROJECT UPDATE

Just dumped the CPU mask ROM and it seems like it's correct -- although I don't totally understand what's in it or how it works. This is (or could someday be) handy in a couple ways:

Reason 1 -- MESS/MAME should now be able to emulate the Casio RZ-1 with fairly minimal effort. That particular NEC processor is already supported by MAME and the CPU, OS ROM, and sound ROMs are now all available, so there's not much inaccessible or undocumented at this point, especially given that the service manual and schematics are pretty explicit.

Reason 2 -- A dead CPU no longer means the RZ-1 has to be parted out, at least in theory. It should be possible to replace the CPU and then jump one or two pins to force it to boot into a custom EPROM which combines the mask ROM and the OS ROM together.

Aside from the CPU mask ROM development, I also tested the ACCENT inversion hack and it was successful. So now my RZ-1 output signals are at their full 10-bit range by default, although I confess it's slightly less satisfying than I anticipated because it seems a tad unorthodox to have a de-accent button (notes entered when ACCENT is held down are actually "normal" volume instead) and then a de-accent even more button (MUTE functioning exactly the same). But that's--at worst--a conceptual oddity because no functions are compromised, and all song/MIDI dynamics work just as they ever did.

Next thing with the firmware is to see if I can optimize the code enough to make room for a MIDI SDS feature. That'd be... sweeeeet.

Re: Casio RZ-1 Custom Firmware

PostPosted: Mon Mar 19, 2018 10:34 pm
by Rasputin
sneakthief wrote:Somewhat related: is it just me, or are there some versions of the RZ-1 where you can change the pattern while playing and others where you can't?


I can confirm that my RZ-1 cannot change patterns on-the-fly. If anyone has an RZ-1 which can actually do this, I would be very interested in knowing. However, since the ROMs in the RZ-1 are all mass-produced fixed ROMs and not EPROMs--and none of them are in sockets--then I suspect Casio was really committed to their sounds and code and didn't make any different revisions. Pure speculation.

In other news...

- The Casio RZ-1 has now been added to MAME, so we may have a decently functioning virtual RZ-1 in the near future. I'm not really sure how useful this would be for most people aside from potentially playing/editing songs/patterns that were dumped previously via MT port or something, but... hey, it's still interesting. It is useful for debugging and developing new firmware, however.

- I was already aware of this--having disassembled the stock firmware / documenting the source code--but those clever cats at MAME discovered the hidden self-test "Easter egg" in the RZ-1 within a day. So I thought I'd mention what it's all about -- nothing too special, but a nice little curiosity:

Casio RZ-1 Self-Test (RAM / MIDI / MT jack / LED / LCD display / Buttons and Pads) Easter Egg Mode

Enter self-test mode by holding down Record/Delete/Auto Compensate/Beat while turning on the RZ-1 (or Edit/Delete/Insert/Chain, depending on your perspective).

In general, the SAMPLE 4 button advances to the next test, while SAMPLE 2 restarts the current test. The open high-hat will sound on a test failure or invalid input, and the rimshot will sound if the correct button/pad input is accepted during the button test.

The MIDI test is a standard loopback which requires a MIDI cable between MIDI IN and MIDI OUT. I'm unsure how the MT jack is tested, but it's probably loopback as well.

The button test is slightly interesting because the RZ-1 counts the START/STOP button as two separate buttons even though it's only one physical button.

The RZ-1 will reboot when the button test is concluded.

Re: Casio RZ-1 Custom Firmware

PostPosted: Mon Mar 19, 2018 10:50 pm
by madtheory
Rasputin wrote:- The Casio RZ-1 has now been added to MAME, so we may have a decently functioning virtual RZ-1 in the near future. I'm not really sure how useful this would be for most people aside from potentially playing/editing songs/patterns that were dumped previously via MT port or something, but... hey, it's still interesting. It is useful for debugging and developing new firmware, however.

This is cool. I wonder could the same be done for the sequencer of the Casio CZ-5000? Or the standalone four track version, the SZ-1?

Re: Casio RZ-1 Custom Firmware

PostPosted: Mon Mar 19, 2018 11:58 pm
by Rasputin
madtheory wrote:This is cool. I wonder could the same be done for the sequencer of the Casio CZ-5000? Or the standalone four track version, the SZ-1?


I suspect the Casio SZ-1 could almost definitely be done with almost zero effort. The CZ-5000 is likely more complicated but I'm sure is still possible.

I have neither of those or else I'd look into it, but I am currently playing with the CZ-101 (in between zillions of other projects) and it's pretty bizarre because it seems as though Casio intended to use code buried in the CPU, but they apparently abandoned it because all the code that should be in the CPU appears to be at the front of the EPROM. It makes me wonder if they discovered an error in their fixed code and were forced to use a larger EPROM. For whatever reason, there's a LOT of slack in the CZ-101 EPROM, so there's no reason they would have spent more to embed code in the CPU if they weren't originally planning on a smaller EPROM size to begin with.

A bit strange, but the positive thing is that it makes hacking the CZ-101 easier and probably means the CPU can be replaced with any generic NEC 7810 and very minor modification, if any. I'm not sure if that applies to others in the CZ series, but I wouldn't count on it.

Re: Casio RZ-1 Custom Firmware

PostPosted: Tue Apr 17, 2018 5:40 pm
by Rasputin
A (not 100%) working MAME emulation of the Casio RZ-1 can be seen @ 0:17

Watch on youtube.com


Good times.