Tuesday, January 10, 2006

Actual MAME-related work!

For those who haven't heard, the speech chip used in Berzerk has been reverse-engineered by "Lord Nightmare"! This is something I've been waiting for for about 7-8 years! I'm sure that the emulation will end up in MAME and PinMAME sooner or later.

Because of this, I spent some time over Christmas looking at the analog filters on the Berzerk speech board. (These are applied to the sound after it comes out of the chip.) I finished the analysis, and it should be pretty straightforward to add them into MAME after the chip emulation is done.

For what it's worth, I've been trying out Maxima with wxMaxima to do the symbolic math for circuit analysis. I know, I could have used SPICE or something - but doing the math from scratch makes it easier to understand what is going on.

After I worked out about half of the math for these filters by hand, I ended up with about 6 pages of algebra. At this point, I figured I should use this as an excuse for learning Maxima. Sure enough, I found an error on page 5. Darned minus signs! :)

The second half of the analysis took about 5 minutes, since the code from the first half was already done, and I could re-use it!

For those who care - the filter is a third-order lowpass - a first order lowpass, followed by a second order with a resonant peak around 2400 Hz.


Anonymous said...

I'm still not quite done converting the s14001a decoder into a proper emulator yet, but at least I now know how I'm going to go about doing it.

Anonymous said...

TSI S14001A news: I *think* I figured out the last bit of missing S14001A related crud in the decoder, and it is NOT pretty, it'll require a bunch of the decoder stuff to be rewritten due to some incorrect assumptions I made about the SANITY of the device. Whoever designed the silicon implementation of that patent must've been on crack or something because there's some really screwed up crap they're doing.

Votrax News: Kevin Horton managed to de-epoxify and dump both of the internal roms of the ML-1 which were encased in epoxy, and worked out about 60% of the ML-1 schematic so far. The patents are pretty accurate in describing the system, even if they do leave out the most important part, the component values. The high halves of both roms are POSSIBLY the same roms as are used in the SC-01, so once the schematic is complete we can probably get started on an sc-01 emulator.

Anonymous said...

Very cool news there Lord Nightmare!
So any idea wht this means for Q*bert speech?

Anonymous said...

Once we get some semblance of the SC-01 emulation done, and do some clockrate-related modifications to the Q*bert driver, Q*bert will no longer need the speech samples, and hence the speech by the monsters, Q*bert, etc will be correctly handled, instead of randomly choosing one of ten samples as it does now. In addition, Wizard of Wor and Gorf will be able to have speech without needing samples, after some respective driver modifications too.

Currently I'm still working on fixing the entire berzerk driver to not need samples at all, I have the framework done but I still need to attach the various chips up and finish the emulation of the 6840 timer/squarewave generator, and obviously the TSI S14001a itself.
Once the TSI S14001a is implemented in Mame, THREE games will benefit from it, not just one:
1. Berzerk (both sets, plus any other languages that are dumped in the future, we're pretty sure a spanish version exists)
2. Frenzy
3. Wolf Pack (prototype)

I didn't know the third game used a TSI chip at all, until Stefan J. pointed it out to me, and further investigation revealed that indeed it does.

Anonymous said...

Jonathan, I have found you a non-working Votrax SC-01 chip for your friend Kevin to dissect!

Just tell me where to send it to please: gaston at yomail.de


Anonymous said...

Gaston: Sorry I didn't get back to you earlier, I sent an email with my address info for sending the chip.

By the way, it isn't Kevin Horton who'd be disassembling the chip, it would be neviksti.

Kevin Horton disassembles and builds electronic equipment and software. He's also the guy who created the NSF NES sound/music format. He did an amazing job decapsulating and rebuilding the Votrax ML-1, which is a non-integrated-circuit Votrax synthesizer with four formerly-epoxy-coated boards containing the speech synthesizer guts.

Neviksti does various test software and other emulator related (mostly involving DSP/MCU chip) work. He also decapsulates chips and has access to an electron microscope and an EXTREMELY high-power optical microscope which are used extensively when doing so. He successfully dumped the bootrom from the DMG-CPU-01 gameboy CPU, and has also dumped the roms from several other chips, though we don't yet know how to parse them.

Anonymous said...

Brad O.: We're ok in regards to working samples of the SC-01 chip, we probably do not need your sound board. What exactly is wrong with the main board? It sounds repairable...

Anonymous said...

The issue was that we needed a BROKEN SC-01 chip to send to neviksti, because we didn't want to destroy a working one (there are few enough working ones around already) and unfortunately in order to decapsulate a chip the way neviksti does it, it needs to be destroyed. Fortunately, Gaston seems to have found someone with a bad one, and I'll hopefully recieve it shortly and forward it to neviksti.

Anonymous said...

I recieved the broken SC-01 chip, tried to test it and failed, then sent it along with some other hardware I'm working on to Kevin Horton, who successfully tested it and concluded that indeed, it really IS dead. The reason I went through all that trouble to test it is that it wasn't the 'SC-01-A' revision of the sc-01 chip which I have 1 or 2 working samples of; it was the older, MUCH rarer 'SC-01' revision, which was only manufactured for about 9 or 10 months between late 1980 and mid 1981, and I wanted to be 100% sure it was dead before sending it off for decapsulation. If it was NOT dead, I'd have wanted to get some output samples from it for comparison to the SC-01-A, since according to a paper by Dennis Klatt, the two chip revisions have a somewhat different-sounding output, the newer one being better. But, alas, it was dead. So its gonna be heading off to neviksti for decapsulation, and if neviksti has time (and his university has relaxed some recent access restrictions they put in place), he may be able to use the university microscopes to get some dieshots of the chip surface, and hopefully see how the rom is stored. If he can't, I'm going to try to get access to my university's two electron microscopes and do it myself.

Things I need to get off my lazy arse and finish:
Finish berzerk SPU-1000 emulation so the four non-voice samples can be gotten rid of. I have the framework for this done, but it needs to be fleshed out before it will do anything.
Finish the TSI S14001A driver. I have a sample-per-cycle-accurate (well, ALMOST accurate) decoder written for this, but not a cycle-accurate driver, yet.
Finish writing a sample test rom for the TSI S14001A to extract the internal delta table with. So far I know one of the entries (the last one) in the table from the patent does match the chip, but I need to check the other 15 entries. At the same time I need to run a number of tests in mirrored mode, to completely figure out that as-of-yet inexplicable behavior which I mentioned in my second comment here.

Lord Nightmare

Anonymous said...

Lord Nightmare, you said at one point you needed to write a 6840 emulator as part of the work.

I've been trying to write a full 6840 emulator for an unrelated MAME driver - machine/6840ptm.c

I don't know if it helps at all - I know it's not 100%, but it might be better thn starting from scratch.

Anonymous said...

I got 20 NOS Votrax SC-01-A speech Synthesizers. They are all working; never been used. If this item can be reversed engineered and reproduced that would mean a LOT for my Gottlieb Soundboard productions. Contact me at www.swemmerelectronics.com

Keep me posted

Fun with FPGAs - recreating the Atari TIA, Part 1

I have been playing with recreating the Atari TIA chip as used in the original 2600 in an FPGA.  I know this has been done a few times alrea...