ZX Ferrum #02
26 апреля 2004
  Железо  

Iron - MIDI interface for the ZX-Spectrum-compatible computers (continued).

<b>Iron</b> - MIDI interface for the ZX-Spectrum-compatible computers (continued).
  A couple of words from me can be too late and the publication 
of the article (It has already been published in Paragraph # 
18), but the topic is relevant, and can not all read, the more 
I got in touch with the author, and he promised to give more 
information. 

(C) Alex Belodvortsev


                  MIDI interface. Continued.

Greetings, spektrumisty!


  Once again, propose a project <MIDI interface for
ZX-Spectrum-compatible computers>. Why ?
Because it has been repeatedly suggested. Unfortunately -
to no avail. And that reaction to my proposal, which was
90% do not have the right to be called with the result. But I 
do not lost hope, and hope that there are still enthusiasts with

heads that can think creatively and work with your hands, which
. Wake up and start helping. Help
not to me but, first of all, yourself and the platform that 
you're up to So far, no matter what, love. At this time I 
decided write an article in more detail and try not to miss it

most important.

  Why would you start? Probably worth it to start with 
something such that once would have caused concern and 
attracted the attention of users Spectrum. What could it be? 
Probably some kind of thing which Spectrum has not yet had, but 
that would not have superfluous, and, most importantly, that 
would be useful for users of this computer.


  As I recall the story of Speccy in 1985 was carried out
revision of its previous version - to increase the memory up to 
128 kilobytes, the number of screens, and ... was added

Music processor AY-3-8912 (AY-3-8910, YM2149F ... - more -
). Ie Even then, developers puzzled increase
sound capabilities Speccy. For a while, indeed, this
simple trehgolosy synthesizer was a godsend for
spektrumistov, especially for musicians. For it were written
music editors, it immediately began to use in games and
just for scoring programs. Listening to music written for
AY, I sometimes wondered, with a virtuosity of those who wrote 
this music, used by more than a modest (by today)

opportunities AY. And more than once occurred to him - that 
they created, if you give them more advanced technical means?


  Progress does not stand still. Now the possibility of a small 
AY can indeed be regarded as modest. And all

anything if Speccy is now . But! Painfully
so tenacious machine. Until now, there is (from the heart I 
hope) many of its admirers. But time passes, and since I live 
Speccy, it should be improved. And it worked - for him

connected to the mouse, CD-ROM, hard drive, designed modem ...

  Not remain unchanged and sound. One of the most famous
developments in this area, in my opinion, is the General Sound
(GS). Of course, the appearance of this module gives Speccy new 
sound possible, for example, you can write music, using real

tools, loading them into memory modules.

  All this is good. Of course, developers have worked on 
conscience (To develop and debug such a device is very 
difficult - I know from personal experience), but immediately 
ran into his eyes excessively high complexity of the scheme, it 
would be greatly simplified. Also, in my opinion, very 
unfortunate choice of the central processor, which also works 
to limit their opportunities - at the cutoff frequency. Wiser, 
I think, have been used in this scheme, single-chip computer 
i8031, i8051 or their domestic counterparts (VE31, VE51) - 
while they were already available and cost hardly more than 
Z80. I think that the 8051 with its powerful assembly language, 
high performance, ability to address 64kb of RAM + 64KB ROM and 
the ability to easily operate at frequencies up to 25 MHz would 
be more appropriate. 

  However, I will not delve into an analysis of this scheme, 
because is not is the purpose of my article.


  In general, I decided to make my own <the sound card>.
There were two options:

 1. To develop something similar to GS.
 2. Use a commercial sound card.


  The first option I immediately threw away - not worth powder 
and shot. All the same, using available element base (eg,

K572PA1) decent sound quality can not be achieved. And
too much fuss.

  The second option suited me more. But then again, too
Many problems occur when trying to connect the voice board
industrial production. And it's not the number of wires
and additional chips. The problem is that the sound card
There are many varieties and each its own characteristics,
starting with the initialization of the ports and beyond.

  In this case the way out could be to use
family of cards that would have the same connection method and
the same communication protocol for the actual management. Soon 
after this variant was found. In my opinion, it would be wise to

use the so-called .

  In order to make such a sound card to do
the following:


  1. Submit it to the supply voltage (+5 V, +12 V, -12 V);

  2. Form a signal <Reset>;

  3. Connect to the outputs of left and right channel amplifier;

  4. Transmit via the serial port for data management
card.


  In paragraphs 1-3 of the problems have arisen - was produced 
printed board on which were installed:  to connect

the card, RC-chain for signal <reset>
connectors for voltage supply and connect the amplifier.
For <feeding> (transfer) data map was used
one of the parallel port data lines (D0). Data transfer
formed by software.

  At trial run everything went well - the map obediently
served served my team raced out of the speakers terrible
kakafoniya (since I could not wait to hear his creation, then
did not feel like typing any melody. Therefore it was necessary
restrict random notes <from the lantern>). But at the first
trying to write a simple MIDI player, losing MIDI files
I ran into a problem - not enough speed. Melody
stumbling, hobbled, twitching and dragging on crutches.
This occurred due to the fact that the routine transfer of 
bytes of serial communication takes time and

processor had to wait until the last bit is not sent.
Only then resumes processing the MIDI file.

  I had to look for ways to <unloading> processor. Best
option, in my opinion, it would transfer the data to take on
some hardware <lotion> - in this case, the processor
would need only throw her the bytes to send and
periodically asking her whether the transmission has ended.

  The first experiment was using the chips KR580VV51.
The experiment failed because the data transfer rate
MIDI port is 31.25 kbps, and VV51 was just
unable to work at such a speed.

  The second experiment was more successful - was based on
derived scheme MIDI keyboard, which was published in the 
journal <Radio> (N 11, 1993) A. Studnevym. Its basis - single 
chip computer 1816VE35 + register + latch 580IR82 ROM 573RF2. 
Multiplexers, used for polling the keyboard, were thrown

unnecessary. Register 580IR82 was replaced by a much less
1533IR33 hungry chip. Instead ROM 573RF2 was
used its foreign analog 2716. Of the lines of port, 8 were
used to input data (D0-D7), one used for
strobe input (Strobe) and one signaled
process data (Busy). Thus, we have
interface standard , albeit in a simplified form.
Also been rewritten control program.

  The scheme works  - MIDI files are normally 
played in real-time. Also, for the experiment was connected

musical keyboard, and written a simple programm
sequencer. But I still was not happy - scheme MIDI Interface
was somewhat cumbersome and it was difficult to place in
computer chassis. So I had to look for ways to minimize the
device.

  Output is obvious - to use another OEVM. Fortunately, at the
were already widely available chips from Microchip and Atmel. Me
was chosen 20-nogovy Atmelovsky chip AT89C2051 - he had
small size, almost did not require binding and, most
importantly, had a built-in serial port.

  No sooner said than done. We quickly developed the fundamental
scheme (it would be there to develop!), written by the managing
program. I gave up the chain of relief. Now the map
threw herself OEVM. The result was a composition scheme: the 
chip itself AT89C2051, a pair of capacitors 15 pF, a pair of 10 
uF quartz at 6 MHz, circuit board connectors. That

all, not counting the power supply. MIDI-map type used
PT-202. Also, tests were carried out with the card Yamaha 
DB50XG. To connect all this economy to a standard parallel

printer port standard Centronix.

  That's it. On this, my job was done and no longer
resumed. To me it was not necessary, my attempts
interested people in the echo-conference network FIDO 
ZX.SPECTRUM came to nothing. Currently, I have nothing left:

any board with a microcontroller or firmware program. MIDI Card
also left - for music, I use IBM and sound card
Yamaha YMF-754.

  Terribly sorry that the idea is not supported. I'll try  below what I actually proposed:


  1. Equip Speccy quality and inexpensive MIDI synthesizer
(Map of PT-202 or similar is now worth no more than 200 rubles. 
Chip AT89C2051 - no more than 60 rubles.)


  2. Be able to easily transfer music
songs from computer to computer - MIDI file of
30-40 kilobytes may be of considerable length
musical work (no need to drag along with notes and
tools themselves - in a MIDI-map stored in its own ROM
volume, usually 512 KB - 4 MB);

  3. Be able to introduce quality music
support for games and other programs;

  4. Get a binding to a standard - your musical
product can be written in IBM format on a floppy disk and play
for professional equipment;

  5. Musicians can get based on the Speccy and inexpensive
powerful enough music synthesizer with sequencer
(Sequencer - this sort of thing that can memorize
pressed sequence of notes with the possibility of subsequent
playback and editing. An example of this - trackers);

  6. Incidentally, the tracker - it will be possible to write 
new program music editor with many features.


  7. With MIDI adapter can be controlled not only
MIDI card, but any music synthesizer having
MIDI input.


  The list goes on, but it seems to me, given
examples suffice. Think, decide. Why give
your Speccy <new breath>, increasing its sound capabilities?
Are there any musicians on the Spectrum, it is enough <not 
hard-nosed> in Traditional AY, to adopt an innovation? Let's 
write writing, revoke all those who can actually do and

interested in my offer! I have accumulated
significant amount of information on MIDI, with pleasure
share!

  In general, I await your response.

Alex Belodvortsev

Address for correspondence: Belodvortsev Alexei Nikolaevich, 
400066, Volgograd-66, PO Box 11.

e-mail: ra4aux@avtlg.ru



                       Opinion Editor:


  So take a pen trials, claves and write responses to address 
Alexis or edition, and I will send to the author and printed in 
the newspaper. 

  As Confucius said: "The worst enemy of man - is his
laziness, "or another:" The worst enemy of the Spectrum - a lazy
spektrumistov.





Other articles:

Entry - Out of this number was delayed, but the fact were objective reasons for ...

Wheel - letters to the editor by C-jeff and Trident'a from St. Petersburg.

Iron - reset circuit in the "Gluk Reset Service".

Iron - locking scheme buggy ports on the Scorpion and Profi.

Zhlezeo - Cheap stereosilitel on two chips.

Iron - MIDI interface for the ZX-Spectrum-compatible computers (continued).

Iron - Chrome - an Italian clone of the Spectrum!

Iron - Spectrum handheld: ZX-Pad - opinion.

NEWS - The company Zilog introduced 28 January nucleus of the new operating real-time systems RZK.

Authors - the authors of the paper.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Authors - on how to do this newspaper.
From the authors - The first reviews of the newspaper.

В этот день...   2 May