Casio RZ-1 Custom Firmware

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

Casio RZ-1 Custom Firmware

Postby Rasputin » Wed Sep 13, 2017 10:08 pm

I've been (very casually) mulling over the idea of making custom firmware for the RZ-1.

I am now quite dedicated to RZ-1 hacks and have more-or-less finished custom firmware and have implemented the following features:

ACCENT LOCK

Accent lock makes all drum hits have extra emphasis by default. On a stock RZ-1, emphasis can easily be added through MIDI triggering (velocity of 97-127), but live drumming requires holding down the Accent button (losing a hand in the process) or shoving something in the button to keep it stuck down (a guitar pick, etc.) The accent lock feature makes the RZ-1 use its full 10-bits of output during live (non-sequenced) play unless specifically de-emphasized with the ACCENT or MUTE buttons.

Accent lock mode can be toggled by holding ACCENT and pressing VALUE UP/DOWN while in pattern/song standby mode. Although the accent lock behavior is always in effect (real-time playback, recording, etc.), the hotkey to toggle the mode setting is locked out during playback or record modes. The accent lock setting is stored in NVRAM--just like pattern/song/sample memory--so it is persistent but non-permanent; stock behavior can easily be returned to without further EPROM swapping and without even powering on/off.

ON-THE-FLY PATTERN SWITCHING DURING PLAYBACK

In pattern play mode, any other pattern can be selected during playback and it will be queued for play directly after the current pattern. If an unused (never been recorded to) pattern is selected then the current pattern will simply continue playing, minimizing embarrassing mistakes while jamming.

MIDI SDS (kind of)

Now that a SysEx method has been worked out to save/load samples, actual SDS holds only marginal improvement which makes this idea more-or-less unnecessary and not worth the effort. To be clear, this works on stock RZ-1 machines as well, so no custom firmware needed! Say goodbye to MT sideloading.

CUSTOM SAMPLE LENGTHS FOR SOUND ROM BUILDERS

Alternate OS variant which reallocates various slack in ROM to maximize storage of sound data. Chiefly, this significantly extends both the kick and the snare drum (more than doubling the kick length), but also marginally lengthens sample space for the toms and a couple other drum hits. This is only relevant for people that are willing and able to build their own custom sound ROMs, but very handy for those that do.

LOCAL ON/OFF

Use the RZ-1 as a MIDI trigger for other equipment but do not trigger internal sounds. Okay... kind of lackluster, but way more useful than the "Note Enable/Disable" setting which has been replaced. Does anyone even use that?

ADJUSTABLE SAMPLE ATTACK

Eliminates that short silence at the start of samples when sampling through the sampler input. Basically, this tightens up the attack of drum hits so they don't lag behind the beat compared to the ROM sounds. This is fully adjustable, so drum hits can have ultra-tight attack (tighter than the stock toms!) while strings can retain their soft attack, and so on.

In other words, the Casio RZ-1 is effectively designed to pad the sample input with a 12 millisecond buffer. Typically, this causes drums to fall roughly 11~14 milliseconds behind the drum sounds in ROM which makes for sloppy timing. Now anywhere from 0 to 12 milliseconds can be selected.

METRONOME ON/OFF

Metronome on/off is toggled with the MUTE button and up/down arrow hotkey method (just like accent lock). This has already been coded, however, it uses a fair amount of precious codespace and the same thing could be achieved with a hardware switch, so it might be abandoned to make room for more useful features if absolutely necessary.

SAMPLE REVERSE

Reverse the sound of the Sample 1, Sample 2, Sample 3, and Sample 4 slots -- individual or linked. This uses the INSERT button in the same context as the SAMPLING button, except the selected sample is overwritten with a reversed version of itself. Just like SAMPLING, it cannot be done during a performance but can be done rapidly without powering off.

Idea: Sample a long cymbal into pads 1~4 and then reverse the whole thing for a nice build-up.

INDEPENDENT MIDI TX/RX CHANNEL ASSIGNMENT

Self-explanatory, I hope.



FEATURES THAT MAY ACTUALLY MAKE THE CUT:

- A variant OS which supports 8x2 display addressing instead of 16x1 (as it currently does). Replacing the old display with something modern--while possible--is not just a drop-in affair. But with a few new LCD controller commands in the correct places, it could be.

Note: This has been coded, but currently causes a mysterious bug which locks up the entire machine in a certain menu, so that needs to be resolved before it can be released.


CURRENTLY UNSUPPORTED WISH-LIST IDEAS THAT ALMOST DEFINITELY WILL NOT HAPPEN:
**ranked in priority of how important they are for me, personally ;)

I can only wring out a couple more bytes of codespace, so the firmware is about as jam-packed as it's going to get. What extremely minimal space is left in the ROM is now going to any potential bug fixes and polish, so the feature list is the feature list. Plus, I'm ready to move on with my life, so the show's over once this version is tweaked.

- Copying patterns while in Record mode instead of having to toggle back to Play mode. Not being able to do so is a pretty big workflow hindrance, really. While I've already coded the ability to copy patterns in Record mode, the problem is that there's no real workflow improvement due to not being able to change the selected pattern while in Record mode. Since toggling back-and-forth between Play and Record is essentially still necessary, there's minimal reason to actually release this feature.

- Assigning new MIDI notes to pads (from General MIDI to something custom). Probably not going to be implemented as it's too much effort/code and it's generally easier to just change the controller. 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.

Any suggestions, feedback, or feature requests can certainly be made and will absolutely be considered. It should be noted that the Holy Grail of drum pitch adjustment is beyond the scope of the RZ-1 hardware**, unless someone has a stunningly brilliant method. Pitch adjustment per instrument would require some major hardware/software hacking in combination, and that's super unlikely to happen.

** Yes, I know you can mod the sample clock, but that's not the same idea.
Last edited by Rasputin on Wed Sep 05, 2018 5:03 pm, edited 27 times in total.
Rasputin
Active Member
Active Member
 
Posts: 662
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 Custom Firmware

Postby madtheory » Wed Sep 13, 2017 10:58 pm

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?
User avatar
madtheory
Supporting Member!
Supporting Member!
 
Posts: 5058
Joined: Mon May 01, 2006 12:45 pm
Location: Cork, Ireland
Real name: Tomas Mulcahy
Gear: Flangebeast Mk1, Plonkotron, Morovdis Arpeggiator, Maplin My First EQ, Cabaret Voltaire, Jeff Wayne Thunderchild rack, thermostat, Buck Owens Moog.
Band: Minim

Re: Casio RZ-1 Custom Firmware

Postby sneakthief » Thu Sep 14, 2017 12:11 pm

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?
sneak-thief: raw electrofunk!
http://sneak-thief.com
User avatar
sneakthief
Newbie
Newbie
 
Posts: 78
Joined: Fri Jun 02, 2006 9:43 am
Location: Berlin

Re: Casio RZ-1 Custom Firmware

Postby Walter Ego » Thu Sep 14, 2017 2:05 pm

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.
Walter Ego
seamonkey wrote:I nominate this for STUPIDEST THREAD ever in the history of the internez. ;)
User avatar
Walter Ego
Senior Member
Senior Member
 
Posts: 896
Joined: Thu Feb 09, 2012 7:17 pm
Location: Near Boston
Gear: Various noisemakers hidden around my home and classroom. And a great quantity of caffeine.
Band: 12"VS

Re: Casio RZ-1 Custom Firmware

Postby madtheory » Thu Sep 14, 2017 4:56 pm

Just read about the sideloader hacking Rasputin. That is very cool!
User avatar
madtheory
Supporting Member!
Supporting Member!
 
Posts: 5058
Joined: Mon May 01, 2006 12:45 pm
Location: Cork, Ireland
Real name: Tomas Mulcahy
Gear: Flangebeast Mk1, Plonkotron, Morovdis Arpeggiator, Maplin My First EQ, Cabaret Voltaire, Jeff Wayne Thunderchild rack, thermostat, Buck Owens Moog.
Band: Minim

Re: Casio RZ-1 Custom Firmware

Postby elsongs » Mon Oct 30, 2017 9:42 am

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.
User avatar
elsongs
Active Member
Active Member
 
Posts: 341
Joined: Mon May 22, 2006 8:12 am
Location: Los Angeles

Re: Casio RZ-1 Custom Firmware

Postby Rasputin » Thu Nov 09, 2017 4:10 pm

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
Rasputin
Active Member
Active Member
 
Posts: 662
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 Custom Firmware

Postby Rasputin » Thu Jan 11, 2018 5:09 pm

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.
Rasputin
Active Member
Active Member
 
Posts: 662
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 Custom Firmware

Postby Rasputin » Sun Jan 14, 2018 5:15 pm

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:
Rasputin
Active Member
Active Member
 
Posts: 662
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 Custom Firmware

Postby Rasputin » Tue Mar 06, 2018 12:13 am

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.
Rasputin
Active Member
Active Member
 
Posts: 662
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 Custom Firmware

Postby Rasputin » Mon Mar 19, 2018 10:34 pm

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.
Rasputin
Active Member
Active Member
 
Posts: 662
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 Custom Firmware

Postby madtheory » Mon Mar 19, 2018 10:50 pm

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?
User avatar
madtheory
Supporting Member!
Supporting Member!
 
Posts: 5058
Joined: Mon May 01, 2006 12:45 pm
Location: Cork, Ireland
Real name: Tomas Mulcahy
Gear: Flangebeast Mk1, Plonkotron, Morovdis Arpeggiator, Maplin My First EQ, Cabaret Voltaire, Jeff Wayne Thunderchild rack, thermostat, Buck Owens Moog.
Band: Minim

Re: Casio RZ-1 Custom Firmware

Postby Rasputin » Mon Mar 19, 2018 11:58 pm

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.
Rasputin
Active Member
Active Member
 
Posts: 662
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 Custom Firmware

Postby Rasputin » Tue Apr 17, 2018 5:40 pm

A (not 100%) working MAME emulation of the Casio RZ-1 can be seen @ 0:17

Watch on youtube.com


Good times.
Rasputin
Active Member
Active Member
 
Posts: 662
Joined: Thu Jul 21, 2016 4:52 am

Re: Casio RZ-1 Custom Firmware

Postby Rasputin » Wed Sep 05, 2018 5:06 pm

Watch on youtube.com


No longer vaporware. :lol:
Rasputin
Active Member
Active Member
 
Posts: 662
Joined: Thu Jul 21, 2016 4:52 am

Next

Return to General Synthesizers

Who is online

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