
Inspired by the topic
of Tristan Perich's 1-bit symphony, he dug out a yellowed cardboard 8 years old in the old rubbish. It turned out to be quite difficult to find the file with the firmware, upload it to the controller (LPT port? What is the LPT port?) And digitize the sound, but the resulting dose of nostalgia was worth it!
Listen to the result> (
mirror ).
Pleasure to name the author of the composition and the toy where it sounded give the commentators (and so there was a video or pictures!), And I’ll tell you a little about the technical side of the issue.
')
The 8-bit RISC microcontroller KR1878BE1 was produced (and is still being manufactured) by the Russian company
Angstrom . This instance has on board 1024 command memory words, 128 bytes of RAM and 64 bytes of non-volatile memory. Unlike Microchip's controllers, the instruction set is richer and they are executed in 2 cycles instead of 4. Now, in terms of peripherals, it is far from the range of the same Microchip or Atmel, but the core is quite good. And if I remember correctly, for the price, he also slightly won against competitors.
The process of porting the audio engine, manual clock synchronization and loading it into the limited resources of the microcontroller took a total of several days, but stretched out for 3 months. Almost everything was done on the Spectrum and only compilation / debug was performed at work where there was access to the PC. Apparently there really is a meaning in the expression “Constraints stimulate creativity”?
Installation obviously does not pretend to elegance and aesthetic value, but in the circle of spektrumistov this thing invariably caused delight, because they KNEW what kind of perversion it is in terms of code:

Diagram of the device (in the classic ASCII version):

It is worth noting that the digitized sound is slightly different from the original due to inaccurate selection of the nominal value of quartz. Ideally (at 7 MHz), 2 clock cycles of the controller should be equal to 1 clock cycle of the Z80.
The source code and binary version of the firmware can be found
here .
I answer the question what all this was stitching. To fill the code, the microcontroller requires a voltage of 12 volts and three lines for data transmission in addition to 5-volt power. The recommended scheme of the programmer seems to have been in the documentation for the crystal, plus somewhere on the Internet a simpler scheme was found (or maybe it was done on its own, I don’t remember). It looks like it is collected (like all the dust wiped off :)

It was connected either to the PC via an adapter to the LPT, or to the Spectrum via a self-connected to the case and an incompatible connector with nothing. Managed according to proprietary software under DOS, or self-written stray that seemed to be something better and even contained a simple decompiler:

If I'm not mistaken,
orangefox was the first to name the toy in which this composition sounded. This is of course Savage 3:


About the author there are differences. In some places I have come across a mention of Jason C. Brooke, but at least in the second part of the trilogy David Whittaker is mentioned.