Yahoo Groups archive

Emax

Index last updated: 2026-04-28 23:23 UTC

Thread

Re: [emax] Re: RS422 fun

Re: [emax] Re: RS422 fun

2008-11-17 by tu@...

I am not sure about the Mac circuitry but the RS422 interface on the Emax should just be standard 
9637 and 9638 RS422 buffers. The input threshold on the 9637 receiver is specified to be +/- 
200mV so it should work with voltages higher than that. Do you have an oscilloscope that you can 
use to probe the 9637 while it is receiving data? If so, you could compare when receiving data 
from the Mac and the PC via RS422.

Its not a priority, but I think it would be worthwhile to have an RS422 interface that would allow 
any PC to be used for sample dumping to the Emax I, Emax II, EII, EIII and EIIIx as well as bank 
transfer with the EII and Emax. Even if an interface box cost some money I feel there would be a 
demand given the numbers of these samplers still in use. The Emu world cannot live on old Macs 
alone :)

/Tristan

Monday, November 17, 2008, 3:24:57 AM, you wrote:

>
After some additional testing I'm pretty sure the problems are not 
caused by timing differences, but by voltage levels. 
I received a PCMCIA RS422 port this week, and this thing has even 
more problems with communicating with the EII and the Emax than my 
USB/RS422 converter device. And again the communication problem is to 
be found in the PC->Emax transmit part, not in the receive part.
I mentioned before that the Mac RS422 is sending very high signal 
levels (higher than "officially" allowed by the RS422 standard). The 
Emu samplers seem to rely on these high signals.
Conclusion: I give up the current experiments. Perhaps some time in 
the future I'll try to make a device based on Mac circuits...

--- In emax@yahoogroups.com, tu@... wrote:
>
> Ok, that is interesting.
> 
> An alternative to direct connection of the RS422 to the PC would be 
a microcontroller sitting 
> between the PC and sampler. I think someone suggested that before. 
It could respond to the 
> sampler with tight timing but handle the loose timing over the PC 
connection. I guess the PC side 
> could be implemented with either RS-232 or USB. But obviously USB 
would require a lot more 
> coding than simply translating RS422 and RS232 port protocols with 
a bit of buffering in between.
> 
> /Tristan
> 
> Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
> 
> >
> Yes it's about the same concept as on the EII: taking an exact dump 
> of the internal Emax memory at 500 kbaud in both directions. Or in 
> other words... transferring an EMX file across the serial line 
> (except for the EMX 39 byte header string of course).
> 
> But there are two major drawbacks compared with the EII: 
> 1/ the Emax uses the MMA standard to accomplish this dump, meaning 
> that the data is sent in packets of 120 bytes instead of 256 bytes, 
> which is slower.
> 2/ it's not possible to dump specific memory segments, the whole 
> thing must be dumped in one sequential loop from the very beginning 
> (position 0) to the very end (position 552959). 
> 
> The second one is a BIG problem: it means that if something goes 
> wrong (like a bad packet) the whole dump must be restarted.
> And... since the PC RS422 communication line with the Emax is not 
> optimal, this kind of error will for sure occur during a bank 
> transfer. On the EII, this means simply re-asking for the 
particular 
> bad data packet, but on the Emax you have to start all over again.
> 
> In practice this means that a full load/unload is simply not 
possible 
> with my current hardware (USB-RS422 and USB-RS232 converters of all 
> kinds) because the loop is restarted endlessly. At the end of the 
> week I'll try an non-USB port device, I hope that one will work.
> If not, a custom RS422 PC port must be built for the Emax/EII, 
based 
> on the RS422 circuits & ICs of the Mac.
> 
> ///E-Synthesist
> 
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > Fantastic! So, is it the same method that the EII uses for bank 
> transfer or something else? Is there 
> > any chance you could document the protocol? 
> > 
> > I think 25-30 seconds should be acceptable for Emax I bank loads. 
> At least it provides an option 
> > for those who can't or don't want to add SCSI. 
> > 
> > The Emax II load time does sound a bit slow. But it might still 
be 
> of use if someone had a working 
> > Emax II with a dead SCSI chip.
> > 
> > Out of interest, can the Emax II directly load an Emax I bank 
(with 
> compressed 8 bit samples) in 
> > this way? 
> > 
> > /Tristan
> > 
> > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
> > 
> > >
> > After some experiments during the weekend, the current status of 
my 
> > little RS422 project is that I know how to do *fast* bank 
> > loads/unloads on the Emax via RS422. 
> > This should reduce the total data transfer time to 25-30 seconds 
on 
> > the Emax-I instead of the 2-3 minutes of Alchemy. Most probably 
> this 
> > was also the total load time of the OMI CDS3 system, which is - 
> let's 
> > say - "acceptable"... 
> > That's about the same speed as loading from a floppy :-) but the 
> > biggest advantage would be that one would have immediate access 
to 
> > hundreds of banks on the PC harddrive instead of having to copy 
> > individual banks to floppy disks first... 
> > Still SCSI is a much better alternative... for those having a 
rev2 
> or 
> > rev3 board, and for those using the Emax-II. BTW at RS422 speed, 
> the 
> > data transfer time on a fully loaded Emax-II Turbo 8M would be 
> about 
> > 7 minutes :-). Fortunately every Emax-II is equipped with SCSI.
> > 
> > I have to write some decent software now which supports the full 
> Emax 
> > handshaking protocol. But I'm pretty sure that the USB<-->RS422 
> > converters will not be the best solution for this communication - 
> > just like with the EII the communication seems to be quite 
> unreliable 
> > when transmitting data from the PC to the Emax, as a consequence 
> the 
> > total transfer time increases dramatically due to handshaking 
> > overhead. 
> > At the end of the week I will have a PCCard RS422 port on my 
> laptop. 
> > This piece of hardware does not suffer from USB latency, so I 
hope 
> it 
> > will work better...
> > 
> > ///E-Synthesist
> > 
> > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@> wrote:
> > >
> > > Yes, I was also thinking there must be some dedicated command 
> (set) 
> > > for fast load/unload. But the fact that John remembered a load 
> time 
> > > of 5 minutes for the OMI cdroms made me doubt again... On the 
> other 
> > > hand it is true that OMI cdroms could only be used after the 
> > release 
> > > of OS 3.2, so this is indeed an indication that additional 
> commands 
> > > have been added, or at least some changes have been applied. I 
> also 
> > > observed that the v 3.2 MIDI protocol is not 100% behaving as 
> > > described in the v 3.0 document, e.g. the timeout handling is 
> > > different. So there are also changes in the 'normal' SYSEX/MMA 
> > > protocol.
> > > By the way: the OMI drive also required a firmware update in 
> order 
> > to 
> > > be compatible with the Emax. Question is of course whether this 
> was 
> > > just a small firmware update (to support the newly added 
commands 
> > in 
> > > the Emax OS) or a huge piece of Emax-specific code (to 
implement 
> > the 
> > > full SYSEX/MMA command set - which is indeed quite unlikely) ...
> > > 
> > > The Emax-II and EIII indeed have a filesystem which is 
optimized 
> > for 
> > > handling different banksizes; I have the specs here because I 
> > needed 
> > > them for EMXP. The EII and Emax are using filesystems with 
fixed 
> > > filesizes in a sequential order.
> > > 
> > > Since I don't have any Emax OMI cdrom disk I'm not even sure 
> > whether 
> > > the banks on these disks are "EMX-like" 8-bit images or 
expanded 
> 12 
> > > bit images. It makes sense that they are 8-bit, because this 
> > allowed 
> > > OMI to put more banks on a CD, to transfer them faster to the 
> Emax 
> > > (if EII-like commands have been implemented in the Emax OS of 
> > course) 
> > > and to use the same bank layout as on the Emax floppy and Emax 
> > > harddisk banks.
> > > 
> > > So despite the "5 minutes load time" note from John, I think we 
> can 
> > > still assume that there is some specific command set in V3.2 
> which 
> > > enables fast bank loads. I will try to find them out during the 
> > > weekend, either by experimenting or by looking into the OS 
> > > binary/disassembled code...
> > > 
> > > ///E-Synthesist
> > > 
> > > 
> > > 
> > > --- In emax@yahoogroups.com, tu@ wrote:
> > > >
> > > > 
> > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
> > > > 
> > > > >
> > > > But the 5 minutes load time may have been reality...
> > > > 
> > > > This can explain why I don't know anyone and find no 
reference 
> at 
> > > all 
> > > > of anyone who actually used this CD-ROM drive with the Emax. 
If 
> > > this 
> > > > 5 minutes load time is true, this must have resulted in a 
> > > commercial 
> > > > failure for OMI when they launched the Emax OMI cd disks... 
but 
> > > they 
> > > > probably released these disks also in Mac/SD format ?
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Yes, such a slow load time would have been a major marketing 
> > > problem. I find it difficult to imagine that Emu would not have 
> > added 
> > > the small amount of 
> > > > extra code required to load in a bank quickly via RS422. If 
> they 
> > > wanted to sell Emaxes then surely there was a strong incentive 
to 
> > > make the sound 
> > > > library efficient to use. I suspect the OMI CDROM system for 
> the 
> > > Emax was not a major market success because of the cost. The 
OMI 
> > > CDROM drive, or 
> > > > even a Mac with a CDROM drive, would have cost a significant 
> > > proportion of the cost of an Emax. The average musician 
probably 
> > > would not have been 
> > > > able to justify that additional expense. Particularly so 
given 
> > that 
> > > early CDROM drives were rather fragile.
> > > > 
> > > > >
> > > > 
> > > > And yes, Emu has done strange things. E.g. the EII cdrom kit 
> > > > supported a "folder" or "category" system: the banks on a 
disk 
> > > could 
> > > > be put in folders (like bank "piano" in folder "acoustic 
> > > keyboards") 
> > > > to make navigation much easier. This feature was not 
available 
> on 
> > > the 
> > > > Emax and EIII harddisks. Maybe Emu considered this to be a 
> > feature 
> > > of 
> > > > OMI and not of Emu themselves, but they could have learned 
from 
> > > > that...
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Surely the category organisation was only a feature of the 
OMI 
> > > CDROM system, as the EII had no control over it. So it was 
OMI's 
> > > CDROM format, not 
> > > > Emu's format. But this also gave OMI the flexibility to put 
as 
> > many 
> > > banks on the disk as they wanted and to organise them as they 
> > wanted. 
> > > There was 
> > > > no restriction on how OMI could do this as long as they could 
> > serve 
> > > up the full memory image of each bank to the EII via the RS422 
> port 
> > > when required.
> > > > 
> > > > Don't the Emax and the EII hard disk formats allocate a fixed 
> > > number of banks for the disk? I believe you cannot fit any more 
> > banks 
> > > on the disk even if 
> > > > the existing banks are only half full of samples. Presumably 
> this 
> > > is because the Emax and EII use a fixed memory size for each 
bank 
> > and 
> > > the complete 
> > > > data for the bank is copied directly between memory and disk 
> when 
> > > you load or save a bank. Each hard disk bank is a the 
equivalent 
> of 
> > > one floppy disk 
> > > > image minus the OS data. I believe the Emax II and EIII use 
> > > variable sized banks. Therefore the number of banks stored on a 
> > hard 
> > > disk or CDROM 
> > > > depends on how much data is contained in each bank. But I 
> believe 
> > > there is still a limit of 100 banks per disk. 
> > > > 
> > > > >
> > > > 
> > > > 
> > > > 
> > > > RS422 Communication with the Emulator was designed based on 
> > > following 
> > > > key principles:
> > > > - all communication, including request/reply for parameter 
> > changes, 
> > > > occurs at 500 Kbaud
> > > > - a whole bank can be downloaded/loaded with one special 
> designed 
> > > > type of command (a command which actually directly 
reads/writes 
> > the 
> > > > RAM memory segments in which the bank data is residing)
> > > > - bulk data load/unload occurs with data packets sized 256 
> bytes, 
> > > of 
> > > > which each byte represents 1 sample point (data is 
transferred 
> in 
> > > > compressed format)
> > > > 
> > > > On the Emax, they seem to have decided that choosing for a 
> > > *standard* 
> > > > medium speed protocol was more important than choosing for a 
> > > > *proprietary* high speed protocol. So they went for the MIDI 
> > > > SYSES/MMA approach:
> > > > - all basic communication, including all 
commands/instructions, 
> > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI sockets or 
> the 
> > > DB9 
> > > > RS422 port are being used.
> > > > - loading/unloading banks requires the full set of SYSEX 
> > commands. 
> > > > Hence to simply download the parameters of just one voice of 
> just 
> > > one 
> > > > preset, already multiple commands must be exchanged with the 
> > Emax. 
> > > > This is due to the fact that in general only one parameter 
can 
> be 
> > > > transferred per command. And this must be done at the slow 
> 31.25 
> > > > Kbaud speed...mmmm...
> > > > - bulk data (sample) load/unload occurs with data packets 
sized 
> > > only 
> > > > 120 bytes (MMA standard). Moreover each sample point requires 
> 12 
> > > bits 
> > > > now instead of 8 bits on the EII since data is transferred in 
> > > linear 
> > > > format instead of compressed format.
> > > > As a consequence, loading/unloading banks is much slower than 
> on 
> > > the 
> > > > EII. Of course, once they released the Emax-II, they would 
have 
> > > faced 
> > > > problems anyway. This machine could have up to 8MB banks and 
> > > doesn't 
> > > > use compression, so even at full 500 kbaud speed and using 
only 
> > one 
> > > > command - which is impossible in reality - the Emax-II would 
> > > require 
> > > > at least 2.7 minutes for loading/unloading banks. Fortunately 
> > there 
> > > > was something invented called SCSI :-)
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Have a look at the MIDI spec for the Emax V3.0 software. The 
> fast 
> > > (RS422) dumps use a protocol based on the MIDI SDS but slightly 
> > > modified. The 
> > > > sample data is dumped as 12 bit linear but the samples are 
> packed 
> > > so that two 12 bit samples are transferred in three 8 bit 
bytes. 
> It 
> > > is also of note that 
> > > > sending 8 bit wide data in this way violates the MIDI 
standard, 
> > as 
> > > bit7 is always reserved as an indicator of a status byte. Of 
> course 
> > > this is not really an 
> > > > issue here as the 500k baud RS422 data is only being 
> transferred 
> > > to/from the Emax so no other MIDI devices will ever see this 
> > > violation of the 
> > > > standard. But the outcome is that dumping samples as 12 bit 
> only 
> > > takes 50% longer than dumping as 8 bit compressed. Doing a 
proper 
> > > MIDI SDS dump 
> > > > of 8 bit or 12 bit data actually takes the same amount of 
time 
> as 
> > > only 7 data bits can be transferred for each byte in the 
message. 
> > So 
> > > an 8 bit dump 
> > > > takes two bytes per sample (7 + 1) while a 12 bit dump also 
> > > requires two bytes per sample (7 + 5). 16 bit dumps are even 
> slower 
> > > as they require three 
> > > > bytes per sample (7 + 7 + 2).
> > > > 
> > > > As you have said, the failure to provide a means of directly 
> > > transferring banks into memory via RS422 seems to be the 
problem 
> in 
> > > the Emax, at least as 
> > > > documented in the V3.0 MIDI spec. But if the V3.0 spec 
already 
> > > provides all the functions required to load banks from the 
CDROM 
> > > drive using MIDI 
> > > > SYSEX and RS422, then why is V3.2 or the SE software claimed 
to 
> > add 
> > > OMI CDROM support? It still seems likely to me that some extra 
> > > functions were 
> > > > added in those versions to support fast bank loading via 
RS422. 
> > If 
> > > not, then the OMI CDROM drive would have to be converting the 8 
> bit 
> > > compressed 
> > > > sample data on the CDROM to 12 bit linear in order to dump 
the 
> > > samples into the Emax. The Emax would then have to convert the 
12 
> > bit 
> > > linear samples 
> > > > back to compressed 8 bit samples. The transfer of samples 
would 
> > > also take 50% longer for 12 bit linear compared to 8 bit 
> > compressed. 
> > > And of course 
> > > > there would be no way for sequencer data included in the bank 
> to 
> > be 
> > > loaded into the Emax. I could be wrong, but it just seems 
> unlikely 
> > > Emu would have 
> > > > made it so difficult when a small software update to the Emax 
> > could 
> > > make bank dumping work in much the same way as the EII.
> > > > 
> > > > >
> > > > 
> > > > Nevertheless I will still do some experiments to find out if 
> the 
> > > Emax 
> > > > OS doesn't have any "fast bank load" commands... 
> > > > By the way: does anyone know whether the binary code of the 
> Emax 
> > OS 
> > > > can easily be de-compiled/disassembled in some way in order 
to 
> > get 
> > > > some kind of source code ? Is a simple Z80 disassembler 
> > sufficient ?
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Unfortunately it seems the only way is to experiment and see 
> what 
> > > can be uncovered. The Emax NS32000 main CPU code can be 
> > disassembled 
> > > but it is 
> > > > not a common processor. The hard part of analyzing the 
> > disassembled 
> > > code is working out where the program and data begins and ends 
as 
> > > well as what 
> > > > interrupt routines are being handled at runtime and how they 
> > > interact. You would need to combine together the code from the 
> disk 
> > > OS image and the 
> > > > EPROM into a processor memory map. Various hardware 
peripherals 
> > > will also probably exist at certain addresses in the memory 
map. 
> To 
> > > pull it all 
> > > > together you will ideally have the circuit schematics, the 
> memory 
> > > map, CPU/chip documentation plus a detailed design description 
of 
> > how 
> > > the system 
> > > > works. Often much of this data can be found in the product 
> > service 
> > > manual. Then you need to determine which routines are called 
when 
> > > MIDI/RS422 
> > > > interrupts are handled. Testing with a logic analyzer probing 
> the 
> > > CPU would certainly make that easier.
> > > > 
> > > > /Tristan
> > > > 
> > > > >
> > > > 
> > > > 
> > > > ///E-Synthesist 
> > > > 
> > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > >
> > > > > That seems excessively slow, as the EII could load a 
similar 
Show quoted textHide quoted text
> > > sized 
> > > > bank from the same CDROM 
> > > > > drive in 12 seconds. Its hard to imagine Emu would not have 
> > > > implemented a similar load time on 
> > > > > the Emax if all it took was adding a software routine. But 
> then 
> > > > again, stranger things have 
> > > > > happened...
> > > > > 
> > > > > /Tristan
> > > > > 
> > > > > Quoting John Silveria II <john@>:
> > > > > 
> > > > > > Somewhere, and I can't remember where, I read that the CD-
> Rom 
> > > > drive
> > > > > > took 
> > > > > > up to 5 minutes to load a bank. I wish I could remember 
> > where. 
> > > So
> > > > > > indeed 
> > > > > > it was not only as slow as typical SYSEX load, it could 
> > > actually 
> > > > take
> > > > > > 
> > > > > > longer.
> > > > > >

Re: RS422 fun

2008-11-17 by esynthesist

To have 100% certainty about the actual problem I should indeed do 
some measurements with an oscilloscope... but I don't have one.
I was (and still) am thinking about buying one, either analog or 
digital. Until now I only did some measurements with an external 
audio card acting as a wave recorder, but its sampling frequency and 
bandwith are - of course - insufficient to do proper measurements on 
500kbaud signals. What I do see however - even with this method - is 
that the amplitude level of the Mac signal is much higher than the PC 
signal.
On the other hand, if the RS422 of the Emax is standard, then I 
shouldn't have any problem. Mmmm... 
Yes, the best solution would consist of a custom RS422 port for the 
PC which can even be externally clocked. But I'm not an electronics 
specialist so it will take a looooonnnnng time before I will end up 
with a working set :-)

///E-Synthesist

--- In emax@yahoogroups.com, tu@... wrote:
>
> I am not sure about the Mac circuitry but the RS422 interface on 
the Emax should just be standard 
> 9637 and 9638 RS422 buffers. The input threshold on the 9637 
receiver is specified to be +/- 
> 200mV so it should work with voltages higher than that. Do you have 
an oscilloscope that you can 
> use to probe the 9637 while it is receiving data? If so, you could 
compare when receiving data 
> from the Mac and the PC via RS422.
> 
> Its not a priority, but I think it would be worthwhile to have an 
RS422 interface that would allow 
> any PC to be used for sample dumping to the Emax I, Emax II, EII, 
EIII and EIIIx as well as bank 
> transfer with the EII and Emax. Even if an interface box cost some 
money I feel there would be a 
> demand given the numbers of these samplers still in use. The Emu 
world cannot live on old Macs 
> alone :)
> 
> /Tristan
> 
> Monday, November 17, 2008, 3:24:57 AM, you wrote:
> 
> >
> After some additional testing I'm pretty sure the problems are not 
> caused by timing differences, but by voltage levels. 
> I received a PCMCIA RS422 port this week, and this thing has even 
> more problems with communicating with the EII and the Emax than my 
> USB/RS422 converter device. And again the communication problem is 
to 
> be found in the PC->Emax transmit part, not in the receive part.
> I mentioned before that the Mac RS422 is sending very high signal 
> levels (higher than "officially" allowed by the RS422 standard). 
The 
> Emu samplers seem to rely on these high signals.
> Conclusion: I give up the current experiments. Perhaps some time in 
> the future I'll try to make a device based on Mac circuits...
> 
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > Ok, that is interesting.
> > 
> > An alternative to direct connection of the RS422 to the PC would 
be 
> a microcontroller sitting 
> > between the PC and sampler. I think someone suggested that 
before. 
> It could respond to the 
> > sampler with tight timing but handle the loose timing over the PC 
> connection. I guess the PC side 
> > could be implemented with either RS-232 or USB. But obviously USB 
> would require a lot more 
> > coding than simply translating RS422 and RS232 port protocols 
with 
> a bit of buffering in between.
> > 
> > /Tristan
> > 
> > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
> > 
> > >
> > Yes it's about the same concept as on the EII: taking an exact 
dump 
> > of the internal Emax memory at 500 kbaud in both directions. Or 
in 
> > other words... transferring an EMX file across the serial line 
> > (except for the EMX 39 byte header string of course).
> > 
> > But there are two major drawbacks compared with the EII: 
> > 1/ the Emax uses the MMA standard to accomplish this dump, 
meaning 
> > that the data is sent in packets of 120 bytes instead of 256 
bytes, 
> > which is slower.
> > 2/ it's not possible to dump specific memory segments, the whole 
> > thing must be dumped in one sequential loop from the very 
beginning 
> > (position 0) to the very end (position 552959). 
> > 
> > The second one is a BIG problem: it means that if something goes 
> > wrong (like a bad packet) the whole dump must be restarted.
> > And... since the PC RS422 communication line with the Emax is not 
> > optimal, this kind of error will for sure occur during a bank 
> > transfer. On the EII, this means simply re-asking for the 
> particular 
> > bad data packet, but on the Emax you have to start all over again.
> > 
> > In practice this means that a full load/unload is simply not 
> possible 
> > with my current hardware (USB-RS422 and USB-RS232 converters of 
all 
> > kinds) because the loop is restarted endlessly. At the end of the 
> > week I'll try an non-USB port device, I hope that one will work.
> > If not, a custom RS422 PC port must be built for the Emax/EII, 
> based 
> > on the RS422 circuits & ICs of the Mac.
> > 
> > ///E-Synthesist
> > 
> > --- In emax@yahoogroups.com, tu@ wrote:
> > >
> > > Fantastic! So, is it the same method that the EII uses for bank 
> > transfer or something else? Is there 
> > > any chance you could document the protocol? 
> > > 
> > > I think 25-30 seconds should be acceptable for Emax I bank 
loads. 
> > At least it provides an option 
> > > for those who can't or don't want to add SCSI. 
> > > 
> > > The Emax II load time does sound a bit slow. But it might still 
> be 
> > of use if someone had a working 
> > > Emax II with a dead SCSI chip.
> > > 
> > > Out of interest, can the Emax II directly load an Emax I bank 
> (with 
> > compressed 8 bit samples) in 
> > > this way? 
> > > 
> > > /Tristan
> > > 
> > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
> > > 
> > > >
> > > After some experiments during the weekend, the current status 
of 
> my 
> > > little RS422 project is that I know how to do *fast* bank 
> > > loads/unloads on the Emax via RS422. 
> > > This should reduce the total data transfer time to 25-30 
seconds 
> on 
> > > the Emax-I instead of the 2-3 minutes of Alchemy. Most probably 
> > this 
> > > was also the total load time of the OMI CDS3 system, which is - 
> > let's 
> > > say - "acceptable"... 
> > > That's about the same speed as loading from a floppy :-) but 
the 
> > > biggest advantage would be that one would have immediate access 
> to 
> > > hundreds of banks on the PC harddrive instead of having to copy 
> > > individual banks to floppy disks first... 
> > > Still SCSI is a much better alternative... for those having a 
> rev2 
> > or 
> > > rev3 board, and for those using the Emax-II. BTW at RS422 
speed, 
> > the 
> > > data transfer time on a fully loaded Emax-II Turbo 8M would be 
> > about 
> > > 7 minutes :-). Fortunately every Emax-II is equipped with SCSI.
> > > 
> > > I have to write some decent software now which supports the 
full 
> > Emax 
> > > handshaking protocol. But I'm pretty sure that the USB<-->RS422 
> > > converters will not be the best solution for this 
communication - 
> > > just like with the EII the communication seems to be quite 
> > unreliable 
> > > when transmitting data from the PC to the Emax, as a 
consequence 
> > the 
> > > total transfer time increases dramatically due to handshaking 
> > > overhead. 
> > > At the end of the week I will have a PCCard RS422 port on my 
> > laptop. 
> > > This piece of hardware does not suffer from USB latency, so I 
> hope 
> > it 
> > > will work better...
> > > 
> > > ///E-Synthesist
> > > 
> > > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@> wrote:
> > > >
> > > > Yes, I was also thinking there must be some dedicated command 
> > (set) 
> > > > for fast load/unload. But the fact that John remembered a 
load 
> > time 
> > > > of 5 minutes for the OMI cdroms made me doubt again... On the 
> > other 
> > > > hand it is true that OMI cdroms could only be used after the 
> > > release 
> > > > of OS 3.2, so this is indeed an indication that additional 
> > commands 
> > > > have been added, or at least some changes have been applied. 
I 
> > also 
> > > > observed that the v 3.2 MIDI protocol is not 100% behaving as 
> > > > described in the v 3.0 document, e.g. the timeout handling is 
> > > > different. So there are also changes in the 'normal' 
SYSEX/MMA 
> > > > protocol.
> > > > By the way: the OMI drive also required a firmware update in 
> > order 
> > > to 
> > > > be compatible with the Emax. Question is of course whether 
this 
> > was 
> > > > just a small firmware update (to support the newly added 
> commands 
> > > in 
> > > > the Emax OS) or a huge piece of Emax-specific code (to 
> implement 
> > > the 
> > > > full SYSEX/MMA command set - which is indeed quite 
unlikely) ...
> > > > 
> > > > The Emax-II and EIII indeed have a filesystem which is 
> optimized 
> > > for 
> > > > handling different banksizes; I have the specs here because I 
> > > needed 
> > > > them for EMXP. The EII and Emax are using filesystems with 
> fixed 
> > > > filesizes in a sequential order.
> > > > 
> > > > Since I don't have any Emax OMI cdrom disk I'm not even sure 
> > > whether 
> > > > the banks on these disks are "EMX-like" 8-bit images or 
> expanded 
> > 12 
> > > > bit images. It makes sense that they are 8-bit, because this 
> > > allowed 
> > > > OMI to put more banks on a CD, to transfer them faster to the 
> > Emax 
> > > > (if EII-like commands have been implemented in the Emax OS of 
> > > course) 
> > > > and to use the same bank layout as on the Emax floppy and 
Emax 
> > > > harddisk banks.
> > > > 
> > > > So despite the "5 minutes load time" note from John, I think 
we 
> > can 
> > > > still assume that there is some specific command set in V3.2 
> > which 
> > > > enables fast bank loads. I will try to find them out during 
the 
> > > > weekend, either by experimenting or by looking into the OS 
> > > > binary/disassembled code...
> > > > 
> > > > ///E-Synthesist
> > > > 
> > > > 
> > > > 
> > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > >
> > > > > 
> > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
> > > > > 
> > > > > >
> > > > > But the 5 minutes load time may have been reality...
> > > > > 
> > > > > This can explain why I don't know anyone and find no 
> reference 
> > at 
> > > > all 
> > > > > of anyone who actually used this CD-ROM drive with the 
Emax. 
> If 
> > > > this 
> > > > > 5 minutes load time is true, this must have resulted in a 
> > > > commercial 
> > > > > failure for OMI when they launched the Emax OMI cd disks... 
> but 
> > > > they 
> > > > > probably released these disks also in Mac/SD format ?
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Yes, such a slow load time would have been a major 
marketing 
> > > > problem. I find it difficult to imagine that Emu would not 
have 
> > > added 
> > > > the small amount of 
> > > > > extra code required to load in a bank quickly via RS422. If 
> > they 
> > > > wanted to sell Emaxes then surely there was a strong 
incentive 
> to 
> > > > make the sound 
> > > > > library efficient to use. I suspect the OMI CDROM system 
for 
> > the 
> > > > Emax was not a major market success because of the cost. The 
> OMI 
> > > > CDROM drive, or 
> > > > > even a Mac with a CDROM drive, would have cost a 
significant 
> > > > proportion of the cost of an Emax. The average musician 
> probably 
> > > > would not have been 
> > > > > able to justify that additional expense. Particularly so 
> given 
> > > that 
> > > > early CDROM drives were rather fragile.
> > > > > 
> > > > > >
> > > > > 
> > > > > And yes, Emu has done strange things. E.g. the EII cdrom 
kit 
> > > > > supported a "folder" or "category" system: the banks on a 
> disk 
> > > > could 
> > > > > be put in folders (like bank "piano" in folder "acoustic 
> > > > keyboards") 
> > > > > to make navigation much easier. This feature was not 
> available 
> > on 
> > > > the 
> > > > > Emax and EIII harddisks. Maybe Emu considered this to be a 
> > > feature 
> > > > of 
> > > > > OMI and not of Emu themselves, but they could have learned 
> from 
> > > > > that...
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Surely the category organisation was only a feature of the 
> OMI 
> > > > CDROM system, as the EII had no control over it. So it was 
> OMI's 
> > > > CDROM format, not 
> > > > > Emu's format. But this also gave OMI the flexibility to put 
> as 
> > > many 
> > > > banks on the disk as they wanted and to organise them as they 
> > > wanted. 
> > > > There was 
> > > > > no restriction on how OMI could do this as long as they 
could 
> > > serve 
> > > > up the full memory image of each bank to the EII via the 
RS422 
> > port 
> > > > when required.
> > > > > 
> > > > > Don't the Emax and the EII hard disk formats allocate a 
fixed 
> > > > number of banks for the disk? I believe you cannot fit any 
more 
> > > banks 
> > > > on the disk even if 
> > > > > the existing banks are only half full of samples. 
Presumably 
> > this 
> > > > is because the Emax and EII use a fixed memory size for each 
> bank 
> > > and 
> > > > the complete 
> > > > > data for the bank is copied directly between memory and 
disk 
> > when 
> > > > you load or save a bank. Each hard disk bank is a the 
> equivalent 
> > of 
> > > > one floppy disk 
> > > > > image minus the OS data. I believe the Emax II and EIII use 
> > > > variable sized banks. Therefore the number of banks stored on 
a 
> > > hard 
> > > > disk or CDROM 
> > > > > depends on how much data is contained in each bank. But I 
> > believe 
> > > > there is still a limit of 100 banks per disk. 
> > > > > 
> > > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > > RS422 Communication with the Emulator was designed based on 
> > > > following 
> > > > > key principles:
> > > > > - all communication, including request/reply for parameter 
> > > changes, 
> > > > > occurs at 500 Kbaud
> > > > > - a whole bank can be downloaded/loaded with one special 
> > designed 
> > > > > type of command (a command which actually directly 
> reads/writes 
> > > the 
> > > > > RAM memory segments in which the bank data is residing)
> > > > > - bulk data load/unload occurs with data packets sized 256 
> > bytes, 
> > > > of 
> > > > > which each byte represents 1 sample point (data is 
> transferred 
> > in 
> > > > > compressed format)
> > > > > 
> > > > > On the Emax, they seem to have decided that choosing for a 
> > > > *standard* 
> > > > > medium speed protocol was more important than choosing for 
a 
> > > > > *proprietary* high speed protocol. So they went for the 
MIDI 
> > > > > SYSES/MMA approach:
> > > > > - all basic communication, including all 
> commands/instructions, 
> > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI sockets 
or 
> > the 
> > > > DB9 
> > > > > RS422 port are being used.
> > > > > - loading/unloading banks requires the full set of SYSEX 
> > > commands. 
> > > > > Hence to simply download the parameters of just one voice 
of 
> > just 
> > > > one 
> > > > > preset, already multiple commands must be exchanged with 
the 
> > > Emax. 
> > > > > This is due to the fact that in general only one parameter 
> can 
> > be 
> > > > > transferred per command. And this must be done at the slow 
> > 31.25 
> > > > > Kbaud speed...mmmm...
> > > > > - bulk data (sample) load/unload occurs with data packets 
> sized 
> > > > only 
> > > > > 120 bytes (MMA standard). Moreover each sample point 
requires 
> > 12 
> > > > bits 
> > > > > now instead of 8 bits on the EII since data is transferred 
in 
> > > > linear 
> > > > > format instead of compressed format.
> > > > > As a consequence, loading/unloading banks is much slower 
than 
> > on 
> > > > the 
> > > > > EII. Of course, once they released the Emax-II, they would 
> have 
> > > > faced 
> > > > > problems anyway. This machine could have up to 8MB banks 
and 
> > > > doesn't 
> > > > > use compression, so even at full 500 kbaud speed and using 
> only 
> > > one 
> > > > > command - which is impossible in reality - the Emax-II 
would 
> > > > require 
> > > > > at least 2.7 minutes for loading/unloading banks. 
Fortunately 
> > > there 
> > > > > was something invented called SCSI :-)
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Have a look at the MIDI spec for the Emax V3.0 software. 
The 
> > fast 
> > > > (RS422) dumps use a protocol based on the MIDI SDS but 
slightly 
> > > > modified. The 
> > > > > sample data is dumped as 12 bit linear but the samples are 
> > packed 
> > > > so that two 12 bit samples are transferred in three 8 bit 
> bytes. 
> > It 
> > > > is also of note that 
> > > > > sending 8 bit wide data in this way violates the MIDI 
> standard, 
> > > as 
> > > > bit7 is always reserved as an indicator of a status byte. Of 
> > course 
> > > > this is not really an 
> > > > > issue here as the 500k baud RS422 data is only being 
> > transferred 
> > > > to/from the Emax so no other MIDI devices will ever see this 
> > > > violation of the 
> > > > > standard. But the outcome is that dumping samples as 12 bit 
> > only 
> > > > takes 50% longer than dumping as 8 bit compressed. Doing a 
> proper 
> > > > MIDI SDS dump 
> > > > > of 8 bit or 12 bit data actually takes the same amount of 
> time 
> > as 
> > > > only 7 data bits can be transferred for each byte in the 
> message. 
> > > So 
> > > > an 8 bit dump 
> > > > > takes two bytes per sample (7 + 1) while a 12 bit dump also 
> > > > requires two bytes per sample (7 + 5). 16 bit dumps are even 
> > slower 
> > > > as they require three 
> > > > > bytes per sample (7 + 7 + 2).
> > > > > 
> > > > > As you have said, the failure to provide a means of 
directly 
> > > > transferring banks into memory via RS422 seems to be the 
> problem 
> > in 
> > > > the Emax, at least as 
> > > > > documented in the V3.0 MIDI spec. But if the V3.0 spec 
> already 
> > > > provides all the functions required to load banks from the 
> CDROM 
> > > > drive using MIDI 
> > > > > SYSEX and RS422, then why is V3.2 or the SE software 
claimed 
> to 
> > > add 
> > > > OMI CDROM support? It still seems likely to me that some 
extra 
> > > > functions were 
> > > > > added in those versions to support fast bank loading via 
> RS422. 
> > > If 
> > > > not, then the OMI CDROM drive would have to be converting the 
8 
> > bit 
> > > > compressed 
> > > > > sample data on the CDROM to 12 bit linear in order to dump 
> the 
> > > > samples into the Emax. The Emax would then have to convert 
the 
> 12 
> > > bit 
> > > > linear samples 
> > > > > back to compressed 8 bit samples. The transfer of samples 
> would 
> > > > also take 50% longer for 12 bit linear compared to 8 bit 
> > > compressed. 
> > > > And of course 
> > > > > there would be no way for sequencer data included in the 
bank 
> > to 
> > > be 
> > > > loaded into the Emax. I could be wrong, but it just seems 
> > unlikely 
> > > > Emu would have 
> > > > > made it so difficult when a small software update to the 
Emax 
> > > could 
> > > > make bank dumping work in much the same way as the EII.
> > > > > 
> > > > > >
> > > > > 
> > > > > Nevertheless I will still do some experiments to find out 
if 
> > the 
> > > > Emax 
> > > > > OS doesn't have any "fast bank load" commands... 
> > > > > By the way: does anyone know whether the binary code of the 
> > Emax 
> > > OS 
> > > > > can easily be de-compiled/disassembled in some way in order 
> to 
> > > get 
> > > > > some kind of source code ? Is a simple Z80 disassembler 
> > > sufficient ?
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Unfortunately it seems the only way is to experiment and 
see 
> > what 
> > > > can be uncovered. The Emax NS32000 main CPU code can be 
> > > disassembled 
> > > > but it is 
> > > > > not a common processor. The hard part of analyzing the 
> > > disassembled 
> > > > code is working out where the program and data begins and 
ends 
> as 
> > > > well as what 
> > > > > interrupt routines are being handled at runtime and how 
they 
> > > > interact. You would need to combine together the code from 
the 
> > disk 
> > > > OS image and the 
> > > > > EPROM into a processor memory map. Various hardware 
> peripherals 
> > > > will also probably exist at certain addresses in the memory 
> map. 
> > To 
> > > > pull it all 
> > > > > together you will ideally have the circuit schematics, the 
> > memory 
> > > > map, CPU/chip documentation plus a detailed design 
description 
> of 
> > > how 
> > > > the system 
> > > > > works. Often much of this data can be found in the product 
> > > service 
> > > > manual. Then you need to determine which routines are called 
> when 
> > > > MIDI/RS422 
> > > > > interrupts are handled. Testing with a logic analyzer 
probing 
> > the 
> > > > CPU would certainly make that easier.
> > > > > 
> > > > > /Tristan
> > > > > 
> > > > > >
> > > > > 
> > > > > 
> > > > > ///E-Synthesist 
> > > > > 
> > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > >
> > > > > > That seems excessively slow, as the EII could load a 
> similar 
> > > > sized 
> > > > > bank from the same CDROM 
> > > > > > drive in 12 seconds. Its hard to imagine Emu would not 
have 
> > > > > implemented a similar load time on 
> > > > > > the Emax if all it took was adding a software routine. 
But 
> > then 
> > > > > again, stranger things have 
> > > > > > happened...
> > > > > > 
> > > > > > /Tristan
> > > > > > 
> > > > > > Quoting John Silveria II <john@>:
> > > > > > 
> > > > > > > Somewhere, and I can't remember where, I read that the 
CD-
Show quoted textHide quoted text
> > Rom 
> > > > > drive
> > > > > > > took 
> > > > > > > up to 5 minutes to load a bank. I wish I could remember 
> > > where. 
> > > > So
> > > > > > > indeed 
> > > > > > > it was not only as slow as typical SYSEX load, it could 
> > > > actually 
> > > > > take
> > > > > > > 
> > > > > > > longer.
> > > > > > >
>

Re: [emax] Re: RS422 fun

2008-11-17 by Brian Ronn

Hi Emu artists
 
I've been following the thread concerning pc to Emax bank transfer with much interest. 
 
I fully support what Tristian say. I think to, that it will be worthwhile for Emu-users to be able to transfer banks from the pc to the whole Emu line of samplers (Emax, Emax II, EII, EIII & EIIIx) via the RS422 port.
 
I was just hoping that the interface could be an USB to RS422 since I have no more room for a PCI card. :-| But as I read the posts of the impressive guy E-synthesist, this doesn't seem possible. That's a bummer for me.
 
I hope you'll find a solution and keep up the good work :-)
 
Best regards
 
Brian
Denmark
 


--- Den man 17/11/08 skrev tu@... <tu@....au>:

Fra: tu@... <tu@...>
Emne: Re: [emax] Re: RS422 fun
Til: "esynthesist" <emax@yahoogroups.com>
Dato: mandag 17. november 2008 13.24






I am not sure about the Mac circuitry but the RS422 interface on the Emax should just be standard 
9637 and 9638 RS422 buffers. The input threshold on the 9637 receiver is specified to be +/- 
200mV so it should work with voltages higher than that. Do you have an oscilloscope that you can 
use to probe the 9637 while it is receiving data? If so, you could compare when receiving data 
from the Mac and the PC via RS422.

Its not a priority, but I think it would be worthwhile to have an RS422 interface that would allow 
any PC to be used for sample dumping to the Emax I, Emax II, EII, EIII and EIIIx as well as bank 
transfer with the EII and Emax. Even if an interface box cost some money I feel there would be a 
demand given the numbers of these samplers still in use. The Emu world cannot live on old Macs 
alone :)

/Tristan

Monday, November 17, 2008, 3:24:57 AM, you wrote:

>
After some additional testing I'm pretty sure the problems are not 
caused by timing differences, but by voltage levels. 
I received a PCMCIA RS422 port this week, and this thing has even 
more problems with communicating with the EII and the Emax than my 
USB/RS422 converter device. And again the communication problem is to 
be found in the PC->Emax transmit part, not in the receive part.
I mentioned before that the Mac RS422 is sending very high signal 
levels (higher than "officially" allowed by the RS422 standard). The 
Emu samplers seem to rely on these high signals.
Conclusion: I give up the current experiments. Perhaps some time in 
the future I'll try to make a device based on Mac circuits...

--- In emax@yahoogroups. com, tu@... wrote:
>
> Ok, that is interesting.
> 
> An alternative to direct connection of the RS422 to the PC would be 
a microcontroller sitting 
> between the PC and sampler. I think someone suggested that before. 
It could respond to the 
> sampler with tight timing but handle the loose timing over the PC 
connection. I guess the PC side 
> could be implemented with either RS-232 or USB. But obviously USB 
would require a lot more 
> coding than simply translating RS422 and RS232 port protocols with 
a bit of buffering in between.
> 
> /Tristan
> 
> Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
> 
> >
> Yes it's about the same concept as on the EII: taking an exact dump 
> of the internal Emax memory at 500 kbaud in both directions. Or in 
> other words... transferring an EMX file across the serial line 
> (except for the EMX 39 byte header string of course).
> 
> But there are two major drawbacks compared with the EII: 
> 1/ the Emax uses the MMA standard to accomplish this dump, meaning 
> that the data is sent in packets of 120 bytes instead of 256 bytes, 
> which is slower.
> 2/ it's not possible to dump specific memory segments, the whole 
> thing must be dumped in one sequential loop from the very beginning 
> (position 0) to the very end (position 552959). 
> 
> The second one is a BIG problem: it means that if something goes 
> wrong (like a bad packet) the whole dump must be restarted.
> And... since the PC RS422 communication line with the Emax is not 
> optimal, this kind of error will for sure occur during a bank 
> transfer. On the EII, this means simply re-asking for the 
particular 
> bad data packet, but on the Emax you have to start all over again.
> 
> In practice this means that a full load/unload is simply not 
possible 
> with my current hardware (USB-RS422 and USB-RS232 converters of all 
> kinds) because the loop is restarted endlessly. At the end of the 
> week I'll try an non-USB port device, I hope that one will work.
> If not, a custom RS422 PC port must be built for the Emax/EII, 
based 
> on the RS422 circuits & ICs of the Mac.
> 
> ///E-Synthesist
> 
> --- In emax@yahoogroups. com, tu@ wrote:
> >
> > Fantastic! So, is it the same method that the EII uses for bank 
> transfer or something else? Is there 
> > any chance you could document the protocol? 
> > 
> > I think 25-30 seconds should be acceptable for Emax I bank loads. 
> At least it provides an option 
> > for those who can't or don't want to add SCSI. 
> > 
> > The Emax II load time does sound a bit slow. But it might still 
be 
> of use if someone had a working 
> > Emax II with a dead SCSI chip.
> > 
> > Out of interest, can the Emax II directly load an Emax I bank 
(with 
> compressed 8 bit samples) in 
> > this way? 
> > 
> > /Tristan
> > 
> > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
> > 
> > >
> > After some experiments during the weekend, the current status of 
my 
> > little RS422 project is that I know how to do *fast* bank 
> > loads/unloads on the Emax via RS422. 
> > This should reduce the total data transfer time to 25-30 seconds 
on 
> > the Emax-I instead of the 2-3 minutes of Alchemy. Most probably 
> this 
> > was also the total load time of the OMI CDS3 system, which is - 
> let's 
> > say - "acceptable" ... 
> > That's about the same speed as loading from a floppy :-) but the 
> > biggest advantage would be that one would have immediate access 
to 
> > hundreds of banks on the PC harddrive instead of having to copy 
> > individual banks to floppy disks first... 
> > Still SCSI is a much better alternative. .. for those having a 
rev2 
> or 
> > rev3 board, and for those using the Emax-II. BTW at RS422 speed, 
> the 
> > data transfer time on a fully loaded Emax-II Turbo 8M would be 
> about 
> > 7 minutes :-). Fortunately every Emax-II is equipped with SCSI.
> > 
> > I have to write some decent software now which supports the full 
> Emax 
> > handshaking protocol. But I'm pretty sure that the USB<-->RS422 
> > converters will not be the best solution for this communication - 
> > just like with the EII the communication seems to be quite 
> unreliable 
> > when transmitting data from the PC to the Emax, as a consequence 
> the 
> > total transfer time increases dramatically due to handshaking 
> > overhead. 
> > At the end of the week I will have a PCCard RS422 port on my 
> laptop. 
> > This piece of hardware does not suffer from USB latency, so I 
hope 
> it 
> > will work better...
> > 
> > ///E-Synthesist
> > 
> > --- In emax@yahoogroups. com, "esynthesist" <esynthesist@ > wrote:
> > >
> > > Yes, I was also thinking there must be some dedicated command 
> (set) 
> > > for fast load/unload. But the fact that John remembered a load 
> time 
> > > of 5 minutes for the OMI cdroms made me doubt again... On the 
> other 
> > > hand it is true that OMI cdroms could only be used after the 
> > release 
> > > of OS 3.2, so this is indeed an indication that additional 
> commands 
> > > have been added, or at least some changes have been applied. I 
> also 
> > > observed that the v 3.2 MIDI protocol is not 100% behaving as 
> > > described in the v 3.0 document, e.g. the timeout handling is 
> > > different. So there are also changes in the 'normal' SYSEX/MMA 
> > > protocol.
> > > By the way: the OMI drive also required a firmware update in 
> order 
> > to 
> > > be compatible with the Emax. Question is of course whether this 
> was 
> > > just a small firmware update (to support the newly added 
commands 
> > in 
> > > the Emax OS) or a huge piece of Emax-specific code (to 
implement 
> > the 
> > > full SYSEX/MMA command set - which is indeed quite unlikely) ...
> > > 
> > > The Emax-II and EIII indeed have a filesystem which is 
optimized 
> > for 
> > > handling different banksizes; I have the specs here because I 
> > needed 
> > > them for EMXP. The EII and Emax are using filesystems with 
fixed 
> > > filesizes in a sequential order.
> > > 
> > > Since I don't have any Emax OMI cdrom disk I'm not even sure 
> > whether 
> > > the banks on these disks are "EMX-like" 8-bit images or 
expanded 
> 12 
> > > bit images. It makes sense that they are 8-bit, because this 
> > allowed 
> > > OMI to put more banks on a CD, to transfer them faster to the 
> Emax 
> > > (if EII-like commands have been implemented in the Emax OS of 
> > course) 
> > > and to use the same bank layout as on the Emax floppy and Emax 
> > > harddisk banks.
> > > 
> > > So despite the "5 minutes load time" note from John, I think we 
> can 
> > > still assume that there is some specific command set in V3.2 
> which 
> > > enables fast bank loads. I will try to find them out during the 
> > > weekend, either by experimenting or by looking into the OS 
> > > binary/disassembled code...
> > > 
> > > ///E-Synthesist
> > > 
> > > 
> > > 
> > > --- In emax@yahoogroups. com, tu@ wrote:
> > > >
> > > > 
> > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
> > > > 
> > > > >
> > > > But the 5 minutes load time may have been reality...
> > > > 
> > > > This can explain why I don't know anyone and find no 
reference 
> at 
> > > all 
> > > > of anyone who actually used this CD-ROM drive with the Emax. 
If 
> > > this 
> > > > 5 minutes load time is true, this must have resulted in a 
> > > commercial 
> > > > failure for OMI when they launched the Emax OMI cd disks... 
but 
> > > they 
> > > > probably released these disks also in Mac/SD format ?
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Yes, such a slow load time would have been a major marketing 
> > > problem. I find it difficult to imagine that Emu would not have 
> > added 
> > > the small amount of 
> > > > extra code required to load in a bank quickly via RS422. If 
> they 
> > > wanted to sell Emaxes then surely there was a strong incentive 
to 
> > > make the sound 
> > > > library efficient to use. I suspect the OMI CDROM system for 
> the 
> > > Emax was not a major market success because of the cost. The 
OMI 
> > > CDROM drive, or 
> > > > even a Mac with a CDROM drive, would have cost a significant 
> > > proportion of the cost of an Emax. The average musician 
probably 
> > > would not have been 
> > > > able to justify that additional expense. Particularly so 
given 
> > that 
> > > early CDROM drives were rather fragile.
> > > > 
> > > > >
> > > > 
> > > > And yes, Emu has done strange things. E.g. the EII cdrom kit 
> > > > supported a "folder" or "category" system: the banks on a 
disk 
> > > could 
> > > > be put in folders (like bank "piano" in folder "acoustic 
> > > keyboards") 
> > > > to make navigation much easier. This feature was not 
available 
> on 
> > > the 
> > > > Emax and EIII harddisks. Maybe Emu considered this to be a 
> > feature 
> > > of 
> > > > OMI and not of Emu themselves, but they could have learned 
from 
> > > > that...
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Surely the category organisation was only a feature of the 
OMI 
> > > CDROM system, as the EII had no control over it. So it was 
OMI's 
> > > CDROM format, not 
> > > > Emu's format. But this also gave OMI the flexibility to put 
as 
> > many 
> > > banks on the disk as they wanted and to organise them as they 
> > wanted. 
> > > There was 
> > > > no restriction on how OMI could do this as long as they could 
> > serve 
> > > up the full memory image of each bank to the EII via the RS422 
> port 
> > > when required.
> > > > 
> > > > Don't the Emax and the EII hard disk formats allocate a fixed 
> > > number of banks for the disk? I believe you cannot fit any more 
> > banks 
> > > on the disk even if 
> > > > the existing banks are only half full of samples. Presumably 
> this 
> > > is because the Emax and EII use a fixed memory size for each 
bank 
> > and 
> > > the complete 
> > > > data for the bank is copied directly between memory and disk 
> when 
> > > you load or save a bank. Each hard disk bank is a the 
equivalent 
> of 
> > > one floppy disk 
> > > > image minus the OS data. I believe the Emax II and EIII use 
> > > variable sized banks. Therefore the number of banks stored on a 
> > hard 
> > > disk or CDROM 
> > > > depends on how much data is contained in each bank. But I 
> believe 
> > > there is still a limit of 100 banks per disk. 
> > > > 
> > > > >
> > > > 
> > > > 
> > > > 
> > > > RS422 Communication with the Emulator was designed based on 
> > > following 
> > > > key principles:
> > > > - all communication, including request/reply for parameter 
> > changes, 
> > > > occurs at 500 Kbaud
> > > > - a whole bank can be downloaded/loaded with one special 
> designed 
> > > > type of command (a command which actually directly 
reads/writes 
> > the 
> > > > RAM memory segments in which the bank data is residing)
> > > > - bulk data load/unload occurs with data packets sized 256 
> bytes, 
> > > of 
> > > > which each byte represents 1 sample point (data is 
transferred 
> in 
> > > > compressed format)
> > > > 
> > > > On the Emax, they seem to have decided that choosing for a 
> > > *standard* 
> > > > medium speed protocol was more important than choosing for a 
> > > > *proprietary* high speed protocol. So they went for the MIDI 
> > > > SYSES/MMA approach:
> > > > - all basic communication, including all 
commands/instructio ns, 
> > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI sockets or 
> the 
> > > DB9 
> > > > RS422 port are being used.
> > > > - loading/unloading banks requires the full set of SYSEX 
> > commands. 
> > > > Hence to simply download the parameters of just one voice of 
> just 
> > > one 
> > > > preset, already multiple commands must be exchanged with the 
> > Emax. 
> > > > This is due to the fact that in general only one parameter 
can 
> be 
> > > > transferred per command. And this must be done at the slow 
> 31.25 
> > > > Kbaud speed...mmmm. ..
> > > > - bulk data (sample) load/unload occurs with data packets 
sized 
> > > only 
> > > > 120 bytes (MMA standard). Moreover each sample point requires 
> 12 
> > > bits 
> > > > now instead of 8 bits on the EII since data is transferred in 
> > > linear 
> > > > format instead of compressed format.
> > > > As a consequence, loading/unloading banks is much slower than 
> on 
> > > the 
> > > > EII. Of course, once they released the Emax-II, they would 
have 
> > > faced 
> > > > problems anyway. This machine could have up to 8MB banks and 
> > > doesn't 
> > > > use compression, so even at full 500 kbaud speed and using 
only 
> > one 
> > > > command - which is impossible in reality - the Emax-II would 
> > > require 
> > > > at least 2.7 minutes for loading/unloading banks. Fortunately 
> > there 
> > > > was something invented called SCSI :-)
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Have a look at the MIDI spec for the Emax V3.0 software. The 
> fast 
> > > (RS422) dumps use a protocol based on the MIDI SDS but slightly 
> > > modified. The 
> > > > sample data is dumped as 12 bit linear but the samples are 
> packed 
> > > so that two 12 bit samples are transferred in three 8 bit 
bytes. 
> It 
> > > is also of note that 
> > > > sending 8 bit wide data in this way violates the MIDI 
standard, 
> > as 
> > > bit7 is always reserved as an indicator of a status byte. Of 
> course 
> > > this is not really an 
> > > > issue here as the 500k baud RS422 data is only being 
> transferred 
> > > to/from the Emax so no other MIDI devices will ever see this 
> > > violation of the 
> > > > standard. But the outcome is that dumping samples as 12 bit 
> only 
> > > takes 50% longer than dumping as 8 bit compressed. Doing a 
proper 
> > > MIDI SDS dump 
> > > > of 8 bit or 12 bit data actually takes the same amount of 
time 
> as 
> > > only 7 data bits can be transferred for each byte in the 
message. 
> > So 
> > > an 8 bit dump 
> > > > takes two bytes per sample (7 + 1) while a 12 bit dump also 
> > > requires two bytes per sample (7 + 5). 16 bit dumps are even 
> slower 
> > > as they require three 
> > > > bytes per sample (7 + 7 + 2).
> > > > 
> > > > As you have said, the failure to provide a means of directly 
> > > transferring banks into memory via RS422 seems to be the 
problem 
> in 
> > > the Emax, at least as 
> > > > documented in the V3.0 MIDI spec. But if the V3.0 spec 
already 
> > > provides all the functions required to load banks from the 
CDROM 
> > > drive using MIDI 
> > > > SYSEX and RS422, then why is V3.2 or the SE software claimed 
to 
> > add 
> > > OMI CDROM support? It still seems likely to me that some extra 
> > > functions were 
> > > > added in those versions to support fast bank loading via 
RS422. 
> > If 
> > > not, then the OMI CDROM drive would have to be converting the 8 
> bit 
> > > compressed 
> > > > sample data on the CDROM to 12 bit linear in order to dump 
the 
> > > samples into the Emax. The Emax would then have to convert the 
12 
> > bit 
> > > linear samples 
> > > > back to compressed 8 bit samples. The transfer of samples 
would 
> > > also take 50% longer for 12 bit linear compared to 8 bit 
> > compressed. 
> > > And of course 
> > > > there would be no way for sequencer data included in the bank 
> to 
> > be 
> > > loaded into the Emax. I could be wrong, but it just seems 
> unlikely 
> > > Emu would have 
> > > > made it so difficult when a small software update to the Emax 
> > could 
> > > make bank dumping work in much the same way as the EII.
> > > > 
> > > > >
> > > > 
> > > > Nevertheless I will still do some experiments to find out if 
> the 
> > > Emax 
> > > > OS doesn't have any "fast bank load" commands... 
> > > > By the way: does anyone know whether the binary code of the 
> Emax 
> > OS 
> > > > can easily be de-compiled/ disassembled in some way in order 
to 
> > get 
> > > > some kind of source code ? Is a simple Z80 disassembler 
> > sufficient ?
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Unfortunately it seems the only way is to experiment and see 
> what 
> > > can be uncovered. The Emax NS32000 main CPU code can be 
> > disassembled 
> > > but it is 
> > > > not a common processor. The hard part of analyzing the 
> > disassembled 
> > > code is working out where the program and data begins and ends 
as 
> > > well as what 
> > > > interrupt routines are being handled at runtime and how they 
> > > interact. You would need to combine together the code from the 
> disk 
> > > OS image and the 
> > > > EPROM into a processor memory map. Various hardware 
peripherals 
> > > will also probably exist at certain addresses in the memory 
map. 
> To 
> > > pull it all 
> > > > together you will ideally have the circuit schematics, the 
> memory 
> > > map, CPU/chip documentation plus a detailed design description 
of 
> > how 
> > > the system 
> > > > works. Often much of this data can be found in the product 
> > service 
> > > manual. Then you need to determine which routines are called 
when 
> > > MIDI/RS422 
> > > > interrupts are handled. Testing with a logic analyzer probing 
> the 
> > > CPU would certainly make that easier.
> > > > 
> > > > /Tristan
> > > > 
> > > > >
> > > > 
> > > > 
> > > > ///E-Synthesist 
> > > > 
> > > > --- In emax@yahoogroups. com, tu@ wrote:
> > > > >
> > > > > That seems excessively slow, as the EII could load a 
similar 
> > > sized 
> > > > bank from the same CDROM 
> > > > > drive in 12 seconds. Its hard to imagine Emu would not have 
> > > > implemented a similar load time on 
> > > > > the Emax if all it took was adding a software routine. But 
> then 
> > > > again, stranger things have 
> > > > > happened...
> > > > > 
> > > > > /Tristan
> > > > > 
> > > > > Quoting John Silveria II <john@>:
> > > > > 
> > > > > > Somewhere, and I can't remember where, I read that the CD-
> Rom 
> > > > drive
> > > > > > took 
> > > > > > up to 5 minutes to load a bank. I wish I could remember 
> > where. 
> > > So
> > > > > > indeed 
> > > > > > it was not only as slow as typical SYSEX load, it could 
> > > actually 
> > > > take
> > > > > > 
> > > > > > longer.
> > > > > > 

 














      ___________________________________________________________ 
Skal du købe ny bil? Sammenlign priser på brugte biler med Kelkoo og find et godt tilbud! - Se mere her http://dk.yahoo.com/r/pat/mmb

[Non-text portions of this message have been removed]

Re: [emax] Re: RS422 fun

2008-11-21 by tu@...

Yes, an oscilloscope is what you need. I suggest getting a digital model as it should allow you to capture and store the signals you are measuring. Some 
high end multimeters also have oscilloscope functions, but check the bandwidth is well above the highest frequencies you will need to measure. An audio 
card is not suitable for this task.

I did a search on the Mac serial port and it seems that while the output voltage levels are slightly non standard they should not present any problems for 
the Emax 9637 RS422 receiver chip. I only have the Emax II schematics but I believe the RS422 interface should be the same as the Emax. The 9637 
circuit doesn't appear to have any EMI supression or termination other than a pullup to +5V on the noninverting input. So the Emax is relying on the 
sending circuit to ensure a reasonably clean signal arrives. The Mac has an EMI filter on its RS422 port but I am not sure what your PC RS422 port may 
have.

Another thing to look at is the relationship between the 500kHz clock the Emax sends out and the data that is sent back to the Emax from the PC. The 
6850 UART in the Emax relies on a this being within a certain timing range. If the clock to data relationship from the PC RS422 port is not the same as 
from the Mac then this could cause problems. The same would also occur if the PC RS422 transmit clock is drifting because is not locked to the same 
clock that it is receiving from the Emax. Of course the data being sent from the Emax to the PC will be ok because the clock and data are transmitted 
together with the correct timing relationship.

/Tristan

Tuesday, November 18, 2008, 3:58:48 AM, you wrote:

>
To have 100% certainty about the actual problem I should indeed do 
some measurements with an oscilloscope... but I don't have one.
I was (and still) am thinking about buying one, either analog or 
digital. Until now I only did some measurements with an external 
audio card acting as a wave recorder, but its sampling frequency and 
bandwith are - of course - insufficient to do proper measurements on 
500kbaud signals. What I do see however - even with this method - is 
that the amplitude level of the Mac signal is much higher than the PC 
signal.
On the other hand, if the RS422 of the Emax is standard, then I 
shouldn't have any problem. Mmmm... 
Yes, the best solution would consist of a custom RS422 port for the 
PC which can even be externally clocked. But I'm not an electronics 
specialist so it will take a looooonnnnng time before I will end up 
with a working set :-)

///E-Synthesist

--- In emax@yahoogroups.com, tu@... wrote:
>
> I am not sure about the Mac circuitry but the RS422 interface on 
the Emax should just be standard 
> 9637 and 9638 RS422 buffers. The input threshold on the 9637 
receiver is specified to be +/- 
> 200mV so it should work with voltages higher than that. Do you have 
an oscilloscope that you can 
> use to probe the 9637 while it is receiving data? If so, you could 
compare when receiving data 
> from the Mac and the PC via RS422.
> 
> Its not a priority, but I think it would be worthwhile to have an 
RS422 interface that would allow 
> any PC to be used for sample dumping to the Emax I, Emax II, EII, 
EIII and EIIIx as well as bank 
> transfer with the EII and Emax. Even if an interface box cost some 
money I feel there would be a 
> demand given the numbers of these samplers still in use. The Emu 
world cannot live on old Macs 
> alone :)
> 
> /Tristan
> 
> Monday, November 17, 2008, 3:24:57 AM, you wrote:
> 
> >
> After some additional testing I'm pretty sure the problems are not 
> caused by timing differences, but by voltage levels. 
> I received a PCMCIA RS422 port this week, and this thing has even 
> more problems with communicating with the EII and the Emax than my 
> USB/RS422 converter device. And again the communication problem is 
to 
> be found in the PC->Emax transmit part, not in the receive part.
> I mentioned before that the Mac RS422 is sending very high signal 
> levels (higher than "officially" allowed by the RS422 standard). 
The 
> Emu samplers seem to rely on these high signals.
> Conclusion: I give up the current experiments. Perhaps some time in 
> the future I'll try to make a device based on Mac circuits...
> 
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > Ok, that is interesting.
> > 
> > An alternative to direct connection of the RS422 to the PC would 
be 
> a microcontroller sitting 
> > between the PC and sampler. I think someone suggested that 
before. 
> It could respond to the 
> > sampler with tight timing but handle the loose timing over the PC 
> connection. I guess the PC side 
> > could be implemented with either RS-232 or USB. But obviously USB 
> would require a lot more 
> > coding than simply translating RS422 and RS232 port protocols 
with 
> a bit of buffering in between.
> > 
> > /Tristan
> > 
> > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
> > 
> > >
> > Yes it's about the same concept as on the EII: taking an exact 
dump 
> > of the internal Emax memory at 500 kbaud in both directions. Or 
in 
> > other words... transferring an EMX file across the serial line 
> > (except for the EMX 39 byte header string of course).
> > 
> > But there are two major drawbacks compared with the EII: 
> > 1/ the Emax uses the MMA standard to accomplish this dump, 
meaning 
> > that the data is sent in packets of 120 bytes instead of 256 
bytes, 
> > which is slower.
> > 2/ it's not possible to dump specific memory segments, the whole 
> > thing must be dumped in one sequential loop from the very 
beginning 
> > (position 0) to the very end (position 552959). 
> > 
> > The second one is a BIG problem: it means that if something goes 
> > wrong (like a bad packet) the whole dump must be restarted.
> > And... since the PC RS422 communication line with the Emax is not 
> > optimal, this kind of error will for sure occur during a bank 
> > transfer. On the EII, this means simply re-asking for the 
> particular 
> > bad data packet, but on the Emax you have to start all over again.
> > 
> > In practice this means that a full load/unload is simply not 
> possible 
> > with my current hardware (USB-RS422 and USB-RS232 converters of 
all 
> > kinds) because the loop is restarted endlessly. At the end of the 
> > week I'll try an non-USB port device, I hope that one will work.
> > If not, a custom RS422 PC port must be built for the Emax/EII, 
> based 
> > on the RS422 circuits & ICs of the Mac.
> > 
> > ///E-Synthesist
> > 
> > --- In emax@yahoogroups.com, tu@ wrote:
> > >
> > > Fantastic! So, is it the same method that the EII uses for bank 
> > transfer or something else? Is there 
> > > any chance you could document the protocol? 
> > > 
> > > I think 25-30 seconds should be acceptable for Emax I bank 
loads. 
> > At least it provides an option 
> > > for those who can't or don't want to add SCSI. 
> > > 
> > > The Emax II load time does sound a bit slow. But it might still 
> be 
> > of use if someone had a working 
> > > Emax II with a dead SCSI chip.
> > > 
> > > Out of interest, can the Emax II directly load an Emax I bank 
> (with 
> > compressed 8 bit samples) in 
> > > this way? 
> > > 
> > > /Tristan
> > > 
> > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
> > > 
> > > >
> > > After some experiments during the weekend, the current status 
of 
> my 
> > > little RS422 project is that I know how to do *fast* bank 
> > > loads/unloads on the Emax via RS422. 
> > > This should reduce the total data transfer time to 25-30 
seconds 
> on 
> > > the Emax-I instead of the 2-3 minutes of Alchemy. Most probably 
> > this 
> > > was also the total load time of the OMI CDS3 system, which is - 
> > let's 
> > > say - "acceptable"... 
> > > That's about the same speed as loading from a floppy :-) but 
the 
> > > biggest advantage would be that one would have immediate access 
> to 
> > > hundreds of banks on the PC harddrive instead of having to copy 
> > > individual banks to floppy disks first... 
> > > Still SCSI is a much better alternative... for those having a 
> rev2 
> > or 
> > > rev3 board, and for those using the Emax-II. BTW at RS422 
speed, 
> > the 
> > > data transfer time on a fully loaded Emax-II Turbo 8M would be 
> > about 
> > > 7 minutes :-). Fortunately every Emax-II is equipped with SCSI.
> > > 
> > > I have to write some decent software now which supports the 
full 
> > Emax 
> > > handshaking protocol. But I'm pretty sure that the USB<-->RS422 
> > > converters will not be the best solution for this 
communication - 
> > > just like with the EII the communication seems to be quite 
> > unreliable 
> > > when transmitting data from the PC to the Emax, as a 
consequence 
> > the 
> > > total transfer time increases dramatically due to handshaking 
> > > overhead. 
> > > At the end of the week I will have a PCCard RS422 port on my 
> > laptop. 
> > > This piece of hardware does not suffer from USB latency, so I 
> hope 
> > it 
> > > will work better...
> > > 
> > > ///E-Synthesist
> > > 
> > > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@> wrote:
> > > >
> > > > Yes, I was also thinking there must be some dedicated command 
> > (set) 
> > > > for fast load/unload. But the fact that John remembered a 
load 
> > time 
> > > > of 5 minutes for the OMI cdroms made me doubt again... On the 
> > other 
> > > > hand it is true that OMI cdroms could only be used after the 
> > > release 
> > > > of OS 3.2, so this is indeed an indication that additional 
> > commands 
> > > > have been added, or at least some changes have been applied. 
I 
> > also 
> > > > observed that the v 3.2 MIDI protocol is not 100% behaving as 
> > > > described in the v 3.0 document, e.g. the timeout handling is 
> > > > different. So there are also changes in the 'normal' 
SYSEX/MMA 
> > > > protocol.
> > > > By the way: the OMI drive also required a firmware update in 
> > order 
> > > to 
> > > > be compatible with the Emax. Question is of course whether 
this 
> > was 
> > > > just a small firmware update (to support the newly added 
> commands 
> > > in 
> > > > the Emax OS) or a huge piece of Emax-specific code (to 
> implement 
> > > the 
> > > > full SYSEX/MMA command set - which is indeed quite 
unlikely) ...
> > > > 
> > > > The Emax-II and EIII indeed have a filesystem which is 
> optimized 
> > > for 
> > > > handling different banksizes; I have the specs here because I 
> > > needed 
> > > > them for EMXP. The EII and Emax are using filesystems with 
> fixed 
> > > > filesizes in a sequential order.
> > > > 
> > > > Since I don't have any Emax OMI cdrom disk I'm not even sure 
> > > whether 
> > > > the banks on these disks are "EMX-like" 8-bit images or 
> expanded 
> > 12 
> > > > bit images. It makes sense that they are 8-bit, because this 
> > > allowed 
> > > > OMI to put more banks on a CD, to transfer them faster to the 
> > Emax 
> > > > (if EII-like commands have been implemented in the Emax OS of 
> > > course) 
> > > > and to use the same bank layout as on the Emax floppy and 
Emax 
> > > > harddisk banks.
> > > > 
> > > > So despite the "5 minutes load time" note from John, I think 
we 
> > can 
> > > > still assume that there is some specific command set in V3.2 
> > which 
> > > > enables fast bank loads. I will try to find them out during 
the 
> > > > weekend, either by experimenting or by looking into the OS 
> > > > binary/disassembled code...
> > > > 
> > > > ///E-Synthesist
> > > > 
> > > > 
> > > > 
> > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > >
> > > > > 
> > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
> > > > > 
> > > > > >
> > > > > But the 5 minutes load time may have been reality...
> > > > > 
> > > > > This can explain why I don't know anyone and find no 
> reference 
> > at 
> > > > all 
> > > > > of anyone who actually used this CD-ROM drive with the 
Emax. 
> If 
> > > > this 
> > > > > 5 minutes load time is true, this must have resulted in a 
> > > > commercial 
> > > > > failure for OMI when they launched the Emax OMI cd disks... 
> but 
> > > > they 
> > > > > probably released these disks also in Mac/SD format ?
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Yes, such a slow load time would have been a major 
marketing 
> > > > problem. I find it difficult to imagine that Emu would not 
have 
> > > added 
> > > > the small amount of 
> > > > > extra code required to load in a bank quickly via RS422. If 
> > they 
> > > > wanted to sell Emaxes then surely there was a strong 
incentive 
> to 
> > > > make the sound 
> > > > > library efficient to use. I suspect the OMI CDROM system 
for 
> > the 
> > > > Emax was not a major market success because of the cost. The 
> OMI 
> > > > CDROM drive, or 
> > > > > even a Mac with a CDROM drive, would have cost a 
significant 
> > > > proportion of the cost of an Emax. The average musician 
> probably 
> > > > would not have been 
> > > > > able to justify that additional expense. Particularly so 
> given 
> > > that 
> > > > early CDROM drives were rather fragile.
> > > > > 
> > > > > >
> > > > > 
> > > > > And yes, Emu has done strange things. E.g. the EII cdrom 
kit 
> > > > > supported a "folder" or "category" system: the banks on a 
> disk 
> > > > could 
> > > > > be put in folders (like bank "piano" in folder "acoustic 
> > > > keyboards") 
> > > > > to make navigation much easier. This feature was not 
> available 
> > on 
> > > > the 
> > > > > Emax and EIII harddisks. Maybe Emu considered this to be a 
> > > feature 
> > > > of 
> > > > > OMI and not of Emu themselves, but they could have learned 
> from 
> > > > > that...
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Surely the category organisation was only a feature of the 
> OMI 
> > > > CDROM system, as the EII had no control over it. So it was 
> OMI's 
> > > > CDROM format, not 
> > > > > Emu's format. But this also gave OMI the flexibility to put 
> as 
> > > many 
> > > > banks on the disk as they wanted and to organise them as they 
> > > wanted. 
> > > > There was 
> > > > > no restriction on how OMI could do this as long as they 
could 
> > > serve 
> > > > up the full memory image of each bank to the EII via the 
RS422 
> > port 
> > > > when required.
> > > > > 
> > > > > Don't the Emax and the EII hard disk formats allocate a 
fixed 
> > > > number of banks for the disk? I believe you cannot fit any 
more 
> > > banks 
> > > > on the disk even if 
> > > > > the existing banks are only half full of samples. 
Presumably 
> > this 
> > > > is because the Emax and EII use a fixed memory size for each 
> bank 
> > > and 
> > > > the complete 
> > > > > data for the bank is copied directly between memory and 
disk 
> > when 
> > > > you load or save a bank. Each hard disk bank is a the 
> equivalent 
> > of 
> > > > one floppy disk 
> > > > > image minus the OS data. I believe the Emax II and EIII use 
> > > > variable sized banks. Therefore the number of banks stored on 
a 
> > > hard 
> > > > disk or CDROM 
> > > > > depends on how much data is contained in each bank. But I 
> > believe 
> > > > there is still a limit of 100 banks per disk. 
> > > > > 
> > > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > > RS422 Communication with the Emulator was designed based on 
> > > > following 
> > > > > key principles:
> > > > > - all communication, including request/reply for parameter 
> > > changes, 
> > > > > occurs at 500 Kbaud
> > > > > - a whole bank can be downloaded/loaded with one special 
> > designed 
> > > > > type of command (a command which actually directly 
> reads/writes 
> > > the 
> > > > > RAM memory segments in which the bank data is residing)
> > > > > - bulk data load/unload occurs with data packets sized 256 
> > bytes, 
> > > > of 
> > > > > which each byte represents 1 sample point (data is 
> transferred 
> > in 
> > > > > compressed format)
> > > > > 
> > > > > On the Emax, they seem to have decided that choosing for a 
> > > > *standard* 
> > > > > medium speed protocol was more important than choosing for 
a 
> > > > > *proprietary* high speed protocol. So they went for the 
MIDI 
> > > > > SYSES/MMA approach:
> > > > > - all basic communication, including all 
> commands/instructions, 
> > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI sockets 
or 
> > the 
> > > > DB9 
> > > > > RS422 port are being used.
> > > > > - loading/unloading banks requires the full set of SYSEX 
> > > commands. 
> > > > > Hence to simply download the parameters of just one voice 
of 
> > just 
> > > > one 
> > > > > preset, already multiple commands must be exchanged with 
the 
> > > Emax. 
> > > > > This is due to the fact that in general only one parameter 
> can 
> > be 
> > > > > transferred per command. And this must be done at the slow 
> > 31.25 
> > > > > Kbaud speed...mmmm...
> > > > > - bulk data (sample) load/unload occurs with data packets 
> sized 
> > > > only 
> > > > > 120 bytes (MMA standard). Moreover each sample point 
requires 
> > 12 
> > > > bits 
> > > > > now instead of 8 bits on the EII since data is transferred 
in 
> > > > linear 
> > > > > format instead of compressed format.
> > > > > As a consequence, loading/unloading banks is much slower 
than 
> > on 
> > > > the 
> > > > > EII. Of course, once they released the Emax-II, they would 
> have 
> > > > faced 
> > > > > problems anyway. This machine could have up to 8MB banks 
and 
> > > > doesn't 
> > > > > use compression, so even at full 500 kbaud speed and using 
> only 
> > > one 
> > > > > command - which is impossible in reality - the Emax-II 
would 
> > > > require 
> > > > > at least 2.7 minutes for loading/unloading banks. 
Fortunately 
> > > there 
> > > > > was something invented called SCSI :-)
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Have a look at the MIDI spec for the Emax V3.0 software. 
The 
> > fast 
> > > > (RS422) dumps use a protocol based on the MIDI SDS but 
slightly 
> > > > modified. The 
> > > > > sample data is dumped as 12 bit linear but the samples are 
> > packed 
> > > > so that two 12 bit samples are transferred in three 8 bit 
> bytes. 
> > It 
> > > > is also of note that 
> > > > > sending 8 bit wide data in this way violates the MIDI 
> standard, 
> > > as 
> > > > bit7 is always reserved as an indicator of a status byte. Of 
> > course 
> > > > this is not really an 
> > > > > issue here as the 500k baud RS422 data is only being 
> > transferred 
> > > > to/from the Emax so no other MIDI devices will ever see this 
> > > > violation of the 
> > > > > standard. But the outcome is that dumping samples as 12 bit 
> > only 
> > > > takes 50% longer than dumping as 8 bit compressed. Doing a 
> proper 
> > > > MIDI SDS dump 
> > > > > of 8 bit or 12 bit data actually takes the same amount of 
> time 
> > as 
> > > > only 7 data bits can be transferred for each byte in the 
> message. 
> > > So 
> > > > an 8 bit dump 
> > > > > takes two bytes per sample (7 + 1) while a 12 bit dump also 
> > > > requires two bytes per sample (7 + 5). 16 bit dumps are even 
> > slower 
> > > > as they require three 
> > > > > bytes per sample (7 + 7 + 2).
> > > > > 
> > > > > As you have said, the failure to provide a means of 
directly 
> > > > transferring banks into memory via RS422 seems to be the 
> problem 
> > in 
> > > > the Emax, at least as 
> > > > > documented in the V3.0 MIDI spec. But if the V3.0 spec 
> already 
> > > > provides all the functions required to load banks from the 
> CDROM 
> > > > drive using MIDI 
> > > > > SYSEX and RS422, then why is V3.2 or the SE software 
claimed 
> to 
> > > add 
> > > > OMI CDROM support? It still seems likely to me that some 
extra 
> > > > functions were 
> > > > > added in those versions to support fast bank loading via 
> RS422. 
> > > If 
> > > > not, then the OMI CDROM drive would have to be converting the 
8 
> > bit 
> > > > compressed 
> > > > > sample data on the CDROM to 12 bit linear in order to dump 
> the 
> > > > samples into the Emax. The Emax would then have to convert 
the 
> 12 
> > > bit 
> > > > linear samples 
> > > > > back to compressed 8 bit samples. The transfer of samples 
> would 
> > > > also take 50% longer for 12 bit linear compared to 8 bit 
> > > compressed. 
> > > > And of course 
> > > > > there would be no way for sequencer data included in the 
bank 
> > to 
> > > be 
> > > > loaded into the Emax. I could be wrong, but it just seems 
> > unlikely 
> > > > Emu would have 
> > > > > made it so difficult when a small software update to the 
Emax 
> > > could 
> > > > make bank dumping work in much the same way as the EII.
> > > > > 
> > > > > >
> > > > > 
> > > > > Nevertheless I will still do some experiments to find out 
if 
> > the 
> > > > Emax 
> > > > > OS doesn't have any "fast bank load" commands... 
> > > > > By the way: does anyone know whether the binary code of the 
> > Emax 
> > > OS 
> > > > > can easily be de-compiled/disassembled in some way in order 
> to 
> > > get 
> > > > > some kind of source code ? Is a simple Z80 disassembler 
> > > sufficient ?
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Unfortunately it seems the only way is to experiment and 
see 
> > what 
> > > > can be uncovered. The Emax NS32000 main CPU code can be 
> > > disassembled 
> > > > but it is 
> > > > > not a common processor. The hard part of analyzing the 
> > > disassembled 
> > > > code is working out where the program and data begins and 
ends 
> as 
> > > > well as what 
> > > > > interrupt routines are being handled at runtime and how 
they 
> > > > interact. You would need to combine together the code from 
the 
> > disk 
> > > > OS image and the 
> > > > > EPROM into a processor memory map. Various hardware 
> peripherals 
> > > > will also probably exist at certain addresses in the memory 
> map. 
> > To 
> > > > pull it all 
> > > > > together you will ideally have the circuit schematics, the 
> > memory 
> > > > map, CPU/chip documentation plus a detailed design 
description 
> of 
> > > how 
> > > > the system 
> > > > > works. Often much of this data can be found in the product 
> > > service 
> > > > manual. Then you need to determine which routines are called 
> when 
> > > > MIDI/RS422 
> > > > > interrupts are handled. Testing with a logic analyzer 
probing 
> > the 
> > > > CPU would certainly make that easier.
> > > > > 
> > > > > /Tristan
> > > > > 
> > > > > >
> > > > > 
> > > > > 
> > > > > ///E-Synthesist 
> > > > > 
> > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > >
> > > > > > That seems excessively slow, as the EII could load a 
> similar 
> > > > sized 
> > > > > bank from the same CDROM 
> > > > > > drive in 12 seconds. Its hard to imagine Emu would not 
have 
> > > > > implemented a similar load time on 
> > > > > > the Emax if all it took was adding a software routine. 
But 
> > then 
> > > > > again, stranger things have 
> > > > > > happened...
> > > > > > 
> > > > > > /Tristan
> > > > > > 
> > > > > > Quoting John Silveria II <john@>:
> > > > > > 
> > > > > > > Somewhere, and I can't remember where, I read that the 
CD-
Show quoted textHide quoted text
> > Rom 
> > > > > drive
> > > > > > > took 
> > > > > > > up to 5 minutes to load a bank. I wish I could remember 
> > > where. 
> > > > So
> > > > > > > indeed 
> > > > > > > it was not only as slow as typical SYSEX load, it could 
> > > > actually 
> > > > > take
> > > > > > > 
> > > > > > > longer.
> > > > > > >
>

Re: RS422 fun

2008-11-21 by esynthesist

Thanks Tristan.

I'm wondering though: even if we find the actual cause of the problem 
(timing or signal level), I guess there's not much we can do to solve 
the problem. Besides making a custom communication board of course.
Because I don't think characteristics such as "clock to data 
relationship" can be configured on any normal commercial RS422 port 
device for PCs, right ?
That's in fact the only reason why I didn't invest in a scope yet: 
exactly knowing the problem would be nice, but not being able to 
solve it would be frustrating :-)
Man ! I would love the standard PC RS422 ports to be externally 
clockable ! Why is this (once again) one of those "Mac"-only 
features !

Question: the RS422 communication "timeout period" on the Emax can be 
configured with a SYSEX command (from 1 to 127 seconds). But I guess 
this is not something that can help on the lowel level data 
syncronization problem we are dealing with here, right ? I 
guess "our" problem is more related to the speed at which a stream of 
bits (as a whole) is entering the Emax port ?

///E-Synthesist 

--- In emax@yahoogroups.com, tu@... wrote:
>
> Yes, an oscilloscope is what you need. I suggest getting a digital 
model as it should allow you to capture and store the signals you are 
measuring. Some 
> high end multimeters also have oscilloscope functions, but check 
the bandwidth is well above the highest frequencies you will need to 
measure. An audio 
> card is not suitable for this task.
> 
> I did a search on the Mac serial port and it seems that while the 
output voltage levels are slightly non standard they should not 
present any problems for 
> the Emax 9637 RS422 receiver chip. I only have the Emax II 
schematics but I believe the RS422 interface should be the same as 
the Emax. The 9637 
> circuit doesn't appear to have any EMI supression or termination 
other than a pullup to +5V on the noninverting input. So the Emax is 
relying on the 
> sending circuit to ensure a reasonably clean signal arrives. The 
Mac has an EMI filter on its RS422 port but I am not sure what your 
PC RS422 port may 
> have.
> 
> Another thing to look at is the relationship between the 500kHz 
clock the Emax sends out and the data that is sent back to the Emax 
from the PC. The 
> 6850 UART in the Emax relies on a this being within a certain 
timing range. If the clock to data relationship from the PC RS422 
port is not the same as 
> from the Mac then this could cause problems. The same would also 
occur if the PC RS422 transmit clock is drifting because is not 
locked to the same 
> clock that it is receiving from the Emax. Of course the data being 
sent from the Emax to the PC will be ok because the clock and data 
are transmitted 
> together with the correct timing relationship.
> 
> /Tristan
> 
> Tuesday, November 18, 2008, 3:58:48 AM, you wrote:
> 
> >
> To have 100% certainty about the actual problem I should indeed do 
> some measurements with an oscilloscope... but I don't have one.
> I was (and still) am thinking about buying one, either analog or 
> digital. Until now I only did some measurements with an external 
> audio card acting as a wave recorder, but its sampling frequency 
and 
> bandwith are - of course - insufficient to do proper measurements 
on 
> 500kbaud signals. What I do see however - even with this method - 
is 
> that the amplitude level of the Mac signal is much higher than the 
PC 
> signal.
> On the other hand, if the RS422 of the Emax is standard, then I 
> shouldn't have any problem. Mmmm... 
> Yes, the best solution would consist of a custom RS422 port for the 
> PC which can even be externally clocked. But I'm not an electronics 
> specialist so it will take a looooonnnnng time before I will end up 
> with a working set :-)
> 
> ///E-Synthesist
> 
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > I am not sure about the Mac circuitry but the RS422 interface on 
> the Emax should just be standard 
> > 9637 and 9638 RS422 buffers. The input threshold on the 9637 
> receiver is specified to be +/- 
> > 200mV so it should work with voltages higher than that. Do you 
have 
> an oscilloscope that you can 
> > use to probe the 9637 while it is receiving data? If so, you 
could 
> compare when receiving data 
> > from the Mac and the PC via RS422.
> > 
> > Its not a priority, but I think it would be worthwhile to have an 
> RS422 interface that would allow 
> > any PC to be used for sample dumping to the Emax I, Emax II, EII, 
> EIII and EIIIx as well as bank 
> > transfer with the EII and Emax. Even if an interface box cost 
some 
> money I feel there would be a 
> > demand given the numbers of these samplers still in use. The Emu 
> world cannot live on old Macs 
> > alone :)
> > 
> > /Tristan
> > 
> > Monday, November 17, 2008, 3:24:57 AM, you wrote:
> > 
> > >
> > After some additional testing I'm pretty sure the problems are 
not 
> > caused by timing differences, but by voltage levels. 
> > I received a PCMCIA RS422 port this week, and this thing has even 
> > more problems with communicating with the EII and the Emax than 
my 
> > USB/RS422 converter device. And again the communication problem 
is 
> to 
> > be found in the PC->Emax transmit part, not in the receive part.
> > I mentioned before that the Mac RS422 is sending very high signal 
> > levels (higher than "officially" allowed by the RS422 standard). 
> The 
> > Emu samplers seem to rely on these high signals.
> > Conclusion: I give up the current experiments. Perhaps some time 
in 
> > the future I'll try to make a device based on Mac circuits...
> > 
> > --- In emax@yahoogroups.com, tu@ wrote:
> > >
> > > Ok, that is interesting.
> > > 
> > > An alternative to direct connection of the RS422 to the PC 
would 
> be 
> > a microcontroller sitting 
> > > between the PC and sampler. I think someone suggested that 
> before. 
> > It could respond to the 
> > > sampler with tight timing but handle the loose timing over the 
PC 
> > connection. I guess the PC side 
> > > could be implemented with either RS-232 or USB. But obviously 
USB 
> > would require a lot more 
> > > coding than simply translating RS422 and RS232 port protocols 
> with 
> > a bit of buffering in between.
> > > 
> > > /Tristan
> > > 
> > > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
> > > 
> > > >
> > > Yes it's about the same concept as on the EII: taking an exact 
> dump 
> > > of the internal Emax memory at 500 kbaud in both directions. Or 
> in 
> > > other words... transferring an EMX file across the serial line 
> > > (except for the EMX 39 byte header string of course).
> > > 
> > > But there are two major drawbacks compared with the EII: 
> > > 1/ the Emax uses the MMA standard to accomplish this dump, 
> meaning 
> > > that the data is sent in packets of 120 bytes instead of 256 
> bytes, 
> > > which is slower.
> > > 2/ it's not possible to dump specific memory segments, the 
whole 
> > > thing must be dumped in one sequential loop from the very 
> beginning 
> > > (position 0) to the very end (position 552959). 
> > > 
> > > The second one is a BIG problem: it means that if something 
goes 
> > > wrong (like a bad packet) the whole dump must be restarted.
> > > And... since the PC RS422 communication line with the Emax is 
not 
> > > optimal, this kind of error will for sure occur during a bank 
> > > transfer. On the EII, this means simply re-asking for the 
> > particular 
> > > bad data packet, but on the Emax you have to start all over 
again.
> > > 
> > > In practice this means that a full load/unload is simply not 
> > possible 
> > > with my current hardware (USB-RS422 and USB-RS232 converters of 
> all 
> > > kinds) because the loop is restarted endlessly. At the end of 
the 
> > > week I'll try an non-USB port device, I hope that one will work.
> > > If not, a custom RS422 PC port must be built for the Emax/EII, 
> > based 
> > > on the RS422 circuits & ICs of the Mac.
> > > 
> > > ///E-Synthesist
> > > 
> > > --- In emax@yahoogroups.com, tu@ wrote:
> > > >
> > > > Fantastic! So, is it the same method that the EII uses for 
bank 
> > > transfer or something else? Is there 
> > > > any chance you could document the protocol? 
> > > > 
> > > > I think 25-30 seconds should be acceptable for Emax I bank 
> loads. 
> > > At least it provides an option 
> > > > for those who can't or don't want to add SCSI. 
> > > > 
> > > > The Emax II load time does sound a bit slow. But it might 
still 
> > be 
> > > of use if someone had a working 
> > > > Emax II with a dead SCSI chip.
> > > > 
> > > > Out of interest, can the Emax II directly load an Emax I bank 
> > (with 
> > > compressed 8 bit samples) in 
> > > > this way? 
> > > > 
> > > > /Tristan
> > > > 
> > > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
> > > > 
> > > > >
> > > > After some experiments during the weekend, the current status 
> of 
> > my 
> > > > little RS422 project is that I know how to do *fast* bank 
> > > > loads/unloads on the Emax via RS422. 
> > > > This should reduce the total data transfer time to 25-30 
> seconds 
> > on 
> > > > the Emax-I instead of the 2-3 minutes of Alchemy. Most 
probably 
> > > this 
> > > > was also the total load time of the OMI CDS3 system, which 
is - 
> > > let's 
> > > > say - "acceptable"... 
> > > > That's about the same speed as loading from a floppy :-) but 
> the 
> > > > biggest advantage would be that one would have immediate 
access 
> > to 
> > > > hundreds of banks on the PC harddrive instead of having to 
copy 
> > > > individual banks to floppy disks first... 
> > > > Still SCSI is a much better alternative... for those having a 
> > rev2 
> > > or 
> > > > rev3 board, and for those using the Emax-II. BTW at RS422 
> speed, 
> > > the 
> > > > data transfer time on a fully loaded Emax-II Turbo 8M would 
be 
> > > about 
> > > > 7 minutes :-). Fortunately every Emax-II is equipped with 
SCSI.
> > > > 
> > > > I have to write some decent software now which supports the 
> full 
> > > Emax 
> > > > handshaking protocol. But I'm pretty sure that the USB<--
>RS422 
> > > > converters will not be the best solution for this 
> communication - 
> > > > just like with the EII the communication seems to be quite 
> > > unreliable 
> > > > when transmitting data from the PC to the Emax, as a 
> consequence 
> > > the 
> > > > total transfer time increases dramatically due to handshaking 
> > > > overhead. 
> > > > At the end of the week I will have a PCCard RS422 port on my 
> > > laptop. 
> > > > This piece of hardware does not suffer from USB latency, so I 
> > hope 
> > > it 
> > > > will work better...
> > > > 
> > > > ///E-Synthesist
> > > > 
> > > > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@> 
wrote:
> > > > >
> > > > > Yes, I was also thinking there must be some dedicated 
command 
> > > (set) 
> > > > > for fast load/unload. But the fact that John remembered a 
> load 
> > > time 
> > > > > of 5 minutes for the OMI cdroms made me doubt again... On 
the 
> > > other 
> > > > > hand it is true that OMI cdroms could only be used after 
the 
> > > > release 
> > > > > of OS 3.2, so this is indeed an indication that additional 
> > > commands 
> > > > > have been added, or at least some changes have been 
applied. 
> I 
> > > also 
> > > > > observed that the v 3.2 MIDI protocol is not 100% behaving 
as 
> > > > > described in the v 3.0 document, e.g. the timeout handling 
is 
> > > > > different. So there are also changes in the 'normal' 
> SYSEX/MMA 
> > > > > protocol.
> > > > > By the way: the OMI drive also required a firmware update 
in 
> > > order 
> > > > to 
> > > > > be compatible with the Emax. Question is of course whether 
> this 
> > > was 
> > > > > just a small firmware update (to support the newly added 
> > commands 
> > > > in 
> > > > > the Emax OS) or a huge piece of Emax-specific code (to 
> > implement 
> > > > the 
> > > > > full SYSEX/MMA command set - which is indeed quite 
> unlikely) ...
> > > > > 
> > > > > The Emax-II and EIII indeed have a filesystem which is 
> > optimized 
> > > > for 
> > > > > handling different banksizes; I have the specs here because 
I 
> > > > needed 
> > > > > them for EMXP. The EII and Emax are using filesystems with 
> > fixed 
> > > > > filesizes in a sequential order.
> > > > > 
> > > > > Since I don't have any Emax OMI cdrom disk I'm not even 
sure 
> > > > whether 
> > > > > the banks on these disks are "EMX-like" 8-bit images or 
> > expanded 
> > > 12 
> > > > > bit images. It makes sense that they are 8-bit, because 
this 
> > > > allowed 
> > > > > OMI to put more banks on a CD, to transfer them faster to 
the 
> > > Emax 
> > > > > (if EII-like commands have been implemented in the Emax OS 
of 
> > > > course) 
> > > > > and to use the same bank layout as on the Emax floppy and 
> Emax 
> > > > > harddisk banks.
> > > > > 
> > > > > So despite the "5 minutes load time" note from John, I 
think 
> we 
> > > can 
> > > > > still assume that there is some specific command set in 
V3.2 
> > > which 
> > > > > enables fast bank loads. I will try to find them out during 
> the 
> > > > > weekend, either by experimenting or by looking into the OS 
> > > > > binary/disassembled code...
> > > > > 
> > > > > ///E-Synthesist
> > > > > 
> > > > > 
> > > > > 
> > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > >
> > > > > > 
> > > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
> > > > > > 
> > > > > > >
> > > > > > But the 5 minutes load time may have been reality...
> > > > > > 
> > > > > > This can explain why I don't know anyone and find no 
> > reference 
> > > at 
> > > > > all 
> > > > > > of anyone who actually used this CD-ROM drive with the 
> Emax. 
> > If 
> > > > > this 
> > > > > > 5 minutes load time is true, this must have resulted in a 
> > > > > commercial 
> > > > > > failure for OMI when they launched the Emax OMI cd 
disks... 
> > but 
> > > > > they 
> > > > > > probably released these disks also in Mac/SD format ?
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Yes, such a slow load time would have been a major 
> marketing 
> > > > > problem. I find it difficult to imagine that Emu would not 
> have 
> > > > added 
> > > > > the small amount of 
> > > > > > extra code required to load in a bank quickly via RS422. 
If 
> > > they 
> > > > > wanted to sell Emaxes then surely there was a strong 
> incentive 
> > to 
> > > > > make the sound 
> > > > > > library efficient to use. I suspect the OMI CDROM system 
> for 
> > > the 
> > > > > Emax was not a major market success because of the cost. 
The 
> > OMI 
> > > > > CDROM drive, or 
> > > > > > even a Mac with a CDROM drive, would have cost a 
> significant 
> > > > > proportion of the cost of an Emax. The average musician 
> > probably 
> > > > > would not have been 
> > > > > > able to justify that additional expense. Particularly so 
> > given 
> > > > that 
> > > > > early CDROM drives were rather fragile.
> > > > > > 
> > > > > > >
> > > > > > 
> > > > > > And yes, Emu has done strange things. E.g. the EII cdrom 
> kit 
> > > > > > supported a "folder" or "category" system: the banks on a 
> > disk 
> > > > > could 
> > > > > > be put in folders (like bank "piano" in folder "acoustic 
> > > > > keyboards") 
> > > > > > to make navigation much easier. This feature was not 
> > available 
> > > on 
> > > > > the 
> > > > > > Emax and EIII harddisks. Maybe Emu considered this to be 
a 
> > > > feature 
> > > > > of 
> > > > > > OMI and not of Emu themselves, but they could have 
learned 
> > from 
> > > > > > that...
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Surely the category organisation was only a feature of 
the 
> > OMI 
> > > > > CDROM system, as the EII had no control over it. So it was 
> > OMI's 
> > > > > CDROM format, not 
> > > > > > Emu's format. But this also gave OMI the flexibility to 
put 
> > as 
> > > > many 
> > > > > banks on the disk as they wanted and to organise them as 
they 
> > > > wanted. 
> > > > > There was 
> > > > > > no restriction on how OMI could do this as long as they 
> could 
> > > > serve 
> > > > > up the full memory image of each bank to the EII via the 
> RS422 
> > > port 
> > > > > when required.
> > > > > > 
> > > > > > Don't the Emax and the EII hard disk formats allocate a 
> fixed 
> > > > > number of banks for the disk? I believe you cannot fit any 
> more 
> > > > banks 
> > > > > on the disk even if 
> > > > > > the existing banks are only half full of samples. 
> Presumably 
> > > this 
> > > > > is because the Emax and EII use a fixed memory size for 
each 
> > bank 
> > > > and 
> > > > > the complete 
> > > > > > data for the bank is copied directly between memory and 
> disk 
> > > when 
> > > > > you load or save a bank. Each hard disk bank is a the 
> > equivalent 
> > > of 
> > > > > one floppy disk 
> > > > > > image minus the OS data. I believe the Emax II and EIII 
use 
> > > > > variable sized banks. Therefore the number of banks stored 
on 
> a 
> > > > hard 
> > > > > disk or CDROM 
> > > > > > depends on how much data is contained in each bank. But I 
> > > believe 
> > > > > there is still a limit of 100 banks per disk. 
> > > > > > 
> > > > > > >
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > RS422 Communication with the Emulator was designed based 
on 
> > > > > following 
> > > > > > key principles:
> > > > > > - all communication, including request/reply for 
parameter 
> > > > changes, 
> > > > > > occurs at 500 Kbaud
> > > > > > - a whole bank can be downloaded/loaded with one special 
> > > designed 
> > > > > > type of command (a command which actually directly 
> > reads/writes 
> > > > the 
> > > > > > RAM memory segments in which the bank data is residing)
> > > > > > - bulk data load/unload occurs with data packets sized 
256 
> > > bytes, 
> > > > > of 
> > > > > > which each byte represents 1 sample point (data is 
> > transferred 
> > > in 
> > > > > > compressed format)
> > > > > > 
> > > > > > On the Emax, they seem to have decided that choosing for 
a 
> > > > > *standard* 
> > > > > > medium speed protocol was more important than choosing 
for 
> a 
> > > > > > *proprietary* high speed protocol. So they went for the 
> MIDI 
> > > > > > SYSES/MMA approach:
> > > > > > - all basic communication, including all 
> > commands/instructions, 
> > > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI sockets 
> or 
> > > the 
> > > > > DB9 
> > > > > > RS422 port are being used.
> > > > > > - loading/unloading banks requires the full set of SYSEX 
> > > > commands. 
> > > > > > Hence to simply download the parameters of just one voice 
> of 
> > > just 
> > > > > one 
> > > > > > preset, already multiple commands must be exchanged with 
> the 
> > > > Emax. 
> > > > > > This is due to the fact that in general only one 
parameter 
> > can 
> > > be 
> > > > > > transferred per command. And this must be done at the 
slow 
> > > 31.25 
> > > > > > Kbaud speed...mmmm...
> > > > > > - bulk data (sample) load/unload occurs with data packets 
> > sized 
> > > > > only 
> > > > > > 120 bytes (MMA standard). Moreover each sample point 
> requires 
> > > 12 
> > > > > bits 
> > > > > > now instead of 8 bits on the EII since data is 
transferred 
> in 
> > > > > linear 
> > > > > > format instead of compressed format.
> > > > > > As a consequence, loading/unloading banks is much slower 
> than 
> > > on 
> > > > > the 
> > > > > > EII. Of course, once they released the Emax-II, they 
would 
> > have 
> > > > > faced 
> > > > > > problems anyway. This machine could have up to 8MB banks 
> and 
> > > > > doesn't 
> > > > > > use compression, so even at full 500 kbaud speed and 
using 
> > only 
> > > > one 
> > > > > > command - which is impossible in reality - the Emax-II 
> would 
> > > > > require 
> > > > > > at least 2.7 minutes for loading/unloading banks. 
> Fortunately 
> > > > there 
> > > > > > was something invented called SCSI :-)
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Have a look at the MIDI spec for the Emax V3.0 software. 
> The 
> > > fast 
> > > > > (RS422) dumps use a protocol based on the MIDI SDS but 
> slightly 
> > > > > modified. The 
> > > > > > sample data is dumped as 12 bit linear but the samples 
are 
> > > packed 
> > > > > so that two 12 bit samples are transferred in three 8 bit 
> > bytes. 
> > > It 
> > > > > is also of note that 
> > > > > > sending 8 bit wide data in this way violates the MIDI 
> > standard, 
> > > > as 
> > > > > bit7 is always reserved as an indicator of a status byte. 
Of 
> > > course 
> > > > > this is not really an 
> > > > > > issue here as the 500k baud RS422 data is only being 
> > > transferred 
> > > > > to/from the Emax so no other MIDI devices will ever see 
this 
> > > > > violation of the 
> > > > > > standard. But the outcome is that dumping samples as 12 
bit 
> > > only 
> > > > > takes 50% longer than dumping as 8 bit compressed. Doing a 
> > proper 
> > > > > MIDI SDS dump 
> > > > > > of 8 bit or 12 bit data actually takes the same amount of 
> > time 
> > > as 
> > > > > only 7 data bits can be transferred for each byte in the 
> > message. 
> > > > So 
> > > > > an 8 bit dump 
> > > > > > takes two bytes per sample (7 + 1) while a 12 bit dump 
also 
> > > > > requires two bytes per sample (7 + 5). 16 bit dumps are 
even 
> > > slower 
> > > > > as they require three 
> > > > > > bytes per sample (7 + 7 + 2).
> > > > > > 
> > > > > > As you have said, the failure to provide a means of 
> directly 
> > > > > transferring banks into memory via RS422 seems to be the 
> > problem 
> > > in 
> > > > > the Emax, at least as 
> > > > > > documented in the V3.0 MIDI spec. But if the V3.0 spec 
> > already 
> > > > > provides all the functions required to load banks from the 
> > CDROM 
> > > > > drive using MIDI 
> > > > > > SYSEX and RS422, then why is V3.2 or the SE software 
> claimed 
> > to 
> > > > add 
> > > > > OMI CDROM support? It still seems likely to me that some 
> extra 
> > > > > functions were 
> > > > > > added in those versions to support fast bank loading via 
> > RS422. 
> > > > If 
> > > > > not, then the OMI CDROM drive would have to be converting 
the 
> 8 
> > > bit 
> > > > > compressed 
> > > > > > sample data on the CDROM to 12 bit linear in order to 
dump 
> > the 
> > > > > samples into the Emax. The Emax would then have to convert 
> the 
> > 12 
> > > > bit 
> > > > > linear samples 
> > > > > > back to compressed 8 bit samples. The transfer of samples 
> > would 
> > > > > also take 50% longer for 12 bit linear compared to 8 bit 
> > > > compressed. 
> > > > > And of course 
> > > > > > there would be no way for sequencer data included in the 
> bank 
> > > to 
> > > > be 
> > > > > loaded into the Emax. I could be wrong, but it just seems 
> > > unlikely 
> > > > > Emu would have 
> > > > > > made it so difficult when a small software update to the 
> Emax 
> > > > could 
> > > > > make bank dumping work in much the same way as the EII.
> > > > > > 
> > > > > > >
> > > > > > 
> > > > > > Nevertheless I will still do some experiments to find out 
> if 
> > > the 
> > > > > Emax 
> > > > > > OS doesn't have any "fast bank load" commands... 
> > > > > > By the way: does anyone know whether the binary code of 
the 
> > > Emax 
> > > > OS 
> > > > > > can easily be de-compiled/disassembled in some way in 
order 
> > to 
> > > > get 
> > > > > > some kind of source code ? Is a simple Z80 disassembler 
> > > > sufficient ?
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Unfortunately it seems the only way is to experiment and 
> see 
> > > what 
> > > > > can be uncovered. The Emax NS32000 main CPU code can be 
> > > > disassembled 
> > > > > but it is 
> > > > > > not a common processor. The hard part of analyzing the 
> > > > disassembled 
> > > > > code is working out where the program and data begins and 
> ends 
> > as 
> > > > > well as what 
> > > > > > interrupt routines are being handled at runtime and how 
> they 
> > > > > interact. You would need to combine together the code from 
> the 
> > > disk 
> > > > > OS image and the 
> > > > > > EPROM into a processor memory map. Various hardware 
> > peripherals 
> > > > > will also probably exist at certain addresses in the memory 
> > map. 
> > > To 
> > > > > pull it all 
> > > > > > together you will ideally have the circuit schematics, 
the 
> > > memory 
> > > > > map, CPU/chip documentation plus a detailed design 
> description 
> > of 
> > > > how 
> > > > > the system 
> > > > > > works. Often much of this data can be found in the 
product 
> > > > service 
> > > > > manual. Then you need to determine which routines are 
called 
> > when 
> > > > > MIDI/RS422 
> > > > > > interrupts are handled. Testing with a logic analyzer 
> probing 
> > > the 
> > > > > CPU would certainly make that easier.
> > > > > > 
> > > > > > /Tristan
> > > > > > 
> > > > > > >
> > > > > > 
> > > > > > 
> > > > > > ///E-Synthesist 
> > > > > > 
> > > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > > >
> > > > > > > That seems excessively slow, as the EII could load a 
> > similar 
> > > > > sized 
> > > > > > bank from the same CDROM 
> > > > > > > drive in 12 seconds. Its hard to imagine Emu would not 
> have 
> > > > > > implemented a similar load time on 
> > > > > > > the Emax if all it took was adding a software routine. 
> But 
> > > then 
> > > > > > again, stranger things have 
> > > > > > > happened...
> > > > > > > 
> > > > > > > /Tristan
> > > > > > > 
> > > > > > > Quoting John Silveria II <john@>:
> > > > > > > 
> > > > > > > > Somewhere, and I can't remember where, I read that 
the 
> CD-
> > > Rom 
> > > > > > drive
> > > > > > > > took 
> > > > > > > > up to 5 minutes to load a bank. I wish I could 
remember 
> > > > where. 
> > > > > So
> > > > > > > > indeed 
> > > > > > > > it was not only as slow as typical SYSEX load, it 
could 
Show quoted textHide quoted text
> > > > > actually 
> > > > > > take
> > > > > > > > 
> > > > > > > > longer.
> > > > > > > >
> >
>

Re: [emax] Re: RS422 fun

2008-11-21 by mr julian

so the non-USB port didn't work?

That link I sent the other week was to a 422 adapter card that was able 
to run synchronous.... is the issue that this card can only be clock 
master, or something???


PS, you do NOT need a digital storage oscilloscope. A logic analyser 
will tell you way more here.



esynthesist wrote:
Show quoted textHide quoted text
>Thanks Tristan.
>
>I'm wondering though: even if we find the actual cause of the problem 
>(timing or signal level), I guess there's not much we can do to solve 
>the problem. Besides making a custom communication board of course.
>Because I don't think characteristics such as "clock to data 
>relationship" can be configured on any normal commercial RS422 port 
>device for PCs, right ?
>That's in fact the only reason why I didn't invest in a scope yet: 
>exactly knowing the problem would be nice, but not being able to 
>solve it would be frustrating :-)
>Man ! I would love the standard PC RS422 ports to be externally 
>clockable ! Why is this (once again) one of those "Mac"-only 
>features !
>
>Question: the RS422 communication "timeout period" on the Emax can be 
>configured with a SYSEX command (from 1 to 127 seconds). But I guess 
>this is not something that can help on the lowel level data 
>syncronization problem we are dealing with here, right ? I 
>guess "our" problem is more related to the speed at which a stream of 
>bits (as a whole) is entering the Emax port ?
>
>///E-Synthesist 
>
>
>  
>
>  
>

Re: [emax] Re: RS422 fun

2008-11-22 by tu@...

I think the solution here really depends on the actual cause of the problem. It may even be just some simple thing like the cable wiring or a driver 
setting for the PC RS422 hardware. It would be helpful if you could provide some more detail on the hardware you are using. For a start, the exact 
brand and model number of the RS422 interfaces and cables plus the wiring diagrams of the cables.

The best case would be if you could get an existing PC RS422 interface to work with the Emax with no hardware modification. Otherwise the solutions 
start to get more complicated, such as modifying circuits, building an interface board or even having a microcontroller sitting between the PC and the 
Emax doing protocol translation. But now you have the Emax protocols worked out I believe a solution can be achieved. 

If you don't have the tools to measure what is going on in the interface circuits then you will have difficulty sorting this out. I would suggest using a 
digital oscilloscope to measure the TX and RX data signals plus the 500kHz clock at the Emax 6850 UART chip when the Emax is actually communicating 
with both the Mac and the PC. You will need at least two oscilloscope channels to see the clock and the data simultaneously. More channels would be 
nice, but the TX data and clock together and RX data and clock together are the first things to look at. You could also use a logic analyzer but I think an 
oscilloscope is better because it will show the actual waveforms, not just the logic transitions.

Unfortunately the Emax and Mac RS422 interfaces are products of their times, and times move on. No doubt it was a reasonable decision to implement 
the interface to the host computer this way back in the 1980s.

The sysex timeout is related to the dumping protocol and has no real bearing on what happens with the clocking at the data tranfer layer. But you could 
always experiment with it to see if it makes any difference to the problem you are seeing. At this stage we do not know for sure that the problem is at 
the low level.

I am not sure how much experience you have with hardware and communications troubleshooting but I am happy to help or provide further if you 
would like to pursue this. As I said in a previous email, I would like to see a general solution that would allow any of the Emu RS422 equipped samplers 
to be connected to a modern PC for sample dumping and/or bank transfer (where applicable). You have done fabulous work with the EMXP program and 
seem to have the software and Emu formats and protocols worked out. So I think getting this happening should not be too hard :)

/Tristan

Saturday, November 22, 2008, 12:00:21 AM, you wrote:

>
Thanks Tristan.

I'm wondering though: even if we find the actual cause of the problem 
(timing or signal level), I guess there's not much we can do to solve 
the problem. Besides making a custom communication board of course.
Because I don't think characteristics such as "clock to data 
relationship" can be configured on any normal commercial RS422 port 
device for PCs, right ?
That's in fact the only reason why I didn't invest in a scope yet: 
exactly knowing the problem would be nice, but not being able to 
solve it would be frustrating :-)
Man ! I would love the standard PC RS422 ports to be externally 
clockable ! Why is this (once again) one of those "Mac"-only 
features !

Question: the RS422 communication "timeout period" on the Emax can be 
configured with a SYSEX command (from 1 to 127 seconds). But I guess 
this is not something that can help on the lowel level data 
syncronization problem we are dealing with here, right ? I 
guess "our" problem is more related to the speed at which a stream of 
bits (as a whole) is entering the Emax port ?

///E-Synthesist 

--- In emax@yahoogroups.com, tu@... wrote:
>
> Yes, an oscilloscope is what you need. I suggest getting a digital 
model as it should allow you to capture and store the signals you are 
measuring. Some 
> high end multimeters also have oscilloscope functions, but check 
the bandwidth is well above the highest frequencies you will need to 
measure. An audio 
> card is not suitable for this task.
> 
> I did a search on the Mac serial port and it seems that while the 
output voltage levels are slightly non standard they should not 
present any problems for 
> the Emax 9637 RS422 receiver chip. I only have the Emax II 
schematics but I believe the RS422 interface should be the same as 
the Emax. The 9637 
> circuit doesn't appear to have any EMI supression or termination 
other than a pullup to +5V on the noninverting input. So the Emax is 
relying on the 
> sending circuit to ensure a reasonably clean signal arrives. The 
Mac has an EMI filter on its RS422 port but I am not sure what your 
PC RS422 port may 
> have.
> 
> Another thing to look at is the relationship between the 500kHz 
clock the Emax sends out and the data that is sent back to the Emax 
from the PC. The 
> 6850 UART in the Emax relies on a this being within a certain 
timing range. If the clock to data relationship from the PC RS422 
port is not the same as 
> from the Mac then this could cause problems. The same would also 
occur if the PC RS422 transmit clock is drifting because is not 
locked to the same 
> clock that it is receiving from the Emax. Of course the data being 
sent from the Emax to the PC will be ok because the clock and data 
are transmitted 
> together with the correct timing relationship.
> 
> /Tristan
> 
> Tuesday, November 18, 2008, 3:58:48 AM, you wrote:
> 
> >
> To have 100% certainty about the actual problem I should indeed do 
> some measurements with an oscilloscope... but I don't have one.
> I was (and still) am thinking about buying one, either analog or 
> digital. Until now I only did some measurements with an external 
> audio card acting as a wave recorder, but its sampling frequency 
and 
> bandwith are - of course - insufficient to do proper measurements 
on 
> 500kbaud signals. What I do see however - even with this method - 
is 
> that the amplitude level of the Mac signal is much higher than the 
PC 
> signal.
> On the other hand, if the RS422 of the Emax is standard, then I 
> shouldn't have any problem. Mmmm... 
> Yes, the best solution would consist of a custom RS422 port for the 
> PC which can even be externally clocked. But I'm not an electronics 
> specialist so it will take a looooonnnnng time before I will end up 
> with a working set :-)
> 
> ///E-Synthesist
> 
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > I am not sure about the Mac circuitry but the RS422 interface on 
> the Emax should just be standard 
> > 9637 and 9638 RS422 buffers. The input threshold on the 9637 
> receiver is specified to be +/- 
> > 200mV so it should work with voltages higher than that. Do you 
have 
> an oscilloscope that you can 
> > use to probe the 9637 while it is receiving data? If so, you 
could 
> compare when receiving data 
> > from the Mac and the PC via RS422.
> > 
> > Its not a priority, but I think it would be worthwhile to have an 
> RS422 interface that would allow 
> > any PC to be used for sample dumping to the Emax I, Emax II, EII, 
> EIII and EIIIx as well as bank 
> > transfer with the EII and Emax. Even if an interface box cost 
some 
> money I feel there would be a 
> > demand given the numbers of these samplers still in use. The Emu 
> world cannot live on old Macs 
> > alone :)
> > 
> > /Tristan
> > 
> > Monday, November 17, 2008, 3:24:57 AM, you wrote:
> > 
> > >
> > After some additional testing I'm pretty sure the problems are 
not 
> > caused by timing differences, but by voltage levels. 
> > I received a PCMCIA RS422 port this week, and this thing has even 
> > more problems with communicating with the EII and the Emax than 
my 
> > USB/RS422 converter device. And again the communication problem 
is 
> to 
> > be found in the PC->Emax transmit part, not in the receive part.
> > I mentioned before that the Mac RS422 is sending very high signal 
> > levels (higher than "officially" allowed by the RS422 standard). 
> The 
> > Emu samplers seem to rely on these high signals.
> > Conclusion: I give up the current experiments. Perhaps some time 
in 
> > the future I'll try to make a device based on Mac circuits...
> > 
> > --- In emax@yahoogroups.com, tu@ wrote:
> > >
> > > Ok, that is interesting.
> > > 
> > > An alternative to direct connection of the RS422 to the PC 
would 
> be 
> > a microcontroller sitting 
> > > between the PC and sampler. I think someone suggested that 
> before. 
> > It could respond to the 
> > > sampler with tight timing but handle the loose timing over the 
PC 
> > connection. I guess the PC side 
> > > could be implemented with either RS-232 or USB. But obviously 
USB 
> > would require a lot more 
> > > coding than simply translating RS422 and RS232 port protocols 
> with 
> > a bit of buffering in between.
> > > 
> > > /Tristan
> > > 
> > > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
> > > 
> > > >
> > > Yes it's about the same concept as on the EII: taking an exact 
> dump 
> > > of the internal Emax memory at 500 kbaud in both directions. Or 
> in 
> > > other words... transferring an EMX file across the serial line 
> > > (except for the EMX 39 byte header string of course).
> > > 
> > > But there are two major drawbacks compared with the EII: 
> > > 1/ the Emax uses the MMA standard to accomplish this dump, 
> meaning 
> > > that the data is sent in packets of 120 bytes instead of 256 
> bytes, 
> > > which is slower.
> > > 2/ it's not possible to dump specific memory segments, the 
whole 
> > > thing must be dumped in one sequential loop from the very 
> beginning 
> > > (position 0) to the very end (position 552959). 
> > > 
> > > The second one is a BIG problem: it means that if something 
goes 
> > > wrong (like a bad packet) the whole dump must be restarted.
> > > And... since the PC RS422 communication line with the Emax is 
not 
> > > optimal, this kind of error will for sure occur during a bank 
> > > transfer. On the EII, this means simply re-asking for the 
> > particular 
> > > bad data packet, but on the Emax you have to start all over 
again.
> > > 
> > > In practice this means that a full load/unload is simply not 
> > possible 
> > > with my current hardware (USB-RS422 and USB-RS232 converters of 
> all 
> > > kinds) because the loop is restarted endlessly. At the end of 
the 
> > > week I'll try an non-USB port device, I hope that one will work.
> > > If not, a custom RS422 PC port must be built for the Emax/EII, 
> > based 
> > > on the RS422 circuits & ICs of the Mac.
> > > 
> > > ///E-Synthesist
> > > 
> > > --- In emax@yahoogroups.com, tu@ wrote:
> > > >
> > > > Fantastic! So, is it the same method that the EII uses for 
bank 
> > > transfer or something else? Is there 
> > > > any chance you could document the protocol? 
> > > > 
> > > > I think 25-30 seconds should be acceptable for Emax I bank 
> loads. 
> > > At least it provides an option 
> > > > for those who can't or don't want to add SCSI. 
> > > > 
> > > > The Emax II load time does sound a bit slow. But it might 
still 
> > be 
> > > of use if someone had a working 
> > > > Emax II with a dead SCSI chip.
> > > > 
> > > > Out of interest, can the Emax II directly load an Emax I bank 
> > (with 
> > > compressed 8 bit samples) in 
> > > > this way? 
> > > > 
> > > > /Tristan
> > > > 
> > > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
> > > > 
> > > > >
> > > > After some experiments during the weekend, the current status 
> of 
> > my 
> > > > little RS422 project is that I know how to do *fast* bank 
> > > > loads/unloads on the Emax via RS422. 
> > > > This should reduce the total data transfer time to 25-30 
> seconds 
> > on 
> > > > the Emax-I instead of the 2-3 minutes of Alchemy. Most 
probably 
> > > this 
> > > > was also the total load time of the OMI CDS3 system, which 
is - 
> > > let's 
> > > > say - "acceptable"... 
> > > > That's about the same speed as loading from a floppy :-) but 
> the 
> > > > biggest advantage would be that one would have immediate 
access 
> > to 
> > > > hundreds of banks on the PC harddrive instead of having to 
copy 
> > > > individual banks to floppy disks first... 
> > > > Still SCSI is a much better alternative... for those having a 
> > rev2 
> > > or 
> > > > rev3 board, and for those using the Emax-II. BTW at RS422 
> speed, 
> > > the 
> > > > data transfer time on a fully loaded Emax-II Turbo 8M would 
be 
> > > about 
> > > > 7 minutes :-). Fortunately every Emax-II is equipped with 
SCSI.
> > > > 
> > > > I have to write some decent software now which supports the 
> full 
> > > Emax 
> > > > handshaking protocol. But I'm pretty sure that the USB<--
>RS422 
> > > > converters will not be the best solution for this 
> communication - 
> > > > just like with the EII the communication seems to be quite 
> > > unreliable 
> > > > when transmitting data from the PC to the Emax, as a 
> consequence 
> > > the 
> > > > total transfer time increases dramatically due to handshaking 
> > > > overhead. 
> > > > At the end of the week I will have a PCCard RS422 port on my 
> > > laptop. 
> > > > This piece of hardware does not suffer from USB latency, so I 
> > hope 
> > > it 
> > > > will work better...
> > > > 
> > > > ///E-Synthesist
> > > > 
> > > > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@> 
wrote:
> > > > >
> > > > > Yes, I was also thinking there must be some dedicated 
command 
> > > (set) 
> > > > > for fast load/unload. But the fact that John remembered a 
> load 
> > > time 
> > > > > of 5 minutes for the OMI cdroms made me doubt again... On 
the 
> > > other 
> > > > > hand it is true that OMI cdroms could only be used after 
the 
> > > > release 
> > > > > of OS 3.2, so this is indeed an indication that additional 
> > > commands 
> > > > > have been added, or at least some changes have been 
applied. 
> I 
> > > also 
> > > > > observed that the v 3.2 MIDI protocol is not 100% behaving 
as 
> > > > > described in the v 3.0 document, e.g. the timeout handling 
is 
> > > > > different. So there are also changes in the 'normal' 
> SYSEX/MMA 
> > > > > protocol.
> > > > > By the way: the OMI drive also required a firmware update 
in 
> > > order 
> > > > to 
> > > > > be compatible with the Emax. Question is of course whether 
> this 
> > > was 
> > > > > just a small firmware update (to support the newly added 
> > commands 
> > > > in 
> > > > > the Emax OS) or a huge piece of Emax-specific code (to 
> > implement 
> > > > the 
> > > > > full SYSEX/MMA command set - which is indeed quite 
> unlikely) ...
> > > > > 
> > > > > The Emax-II and EIII indeed have a filesystem which is 
> > optimized 
> > > > for 
> > > > > handling different banksizes; I have the specs here because 
I 
> > > > needed 
> > > > > them for EMXP. The EII and Emax are using filesystems with 
> > fixed 
> > > > > filesizes in a sequential order.
> > > > > 
> > > > > Since I don't have any Emax OMI cdrom disk I'm not even 
sure 
> > > > whether 
> > > > > the banks on these disks are "EMX-like" 8-bit images or 
> > expanded 
> > > 12 
> > > > > bit images. It makes sense that they are 8-bit, because 
this 
> > > > allowed 
> > > > > OMI to put more banks on a CD, to transfer them faster to 
the 
> > > Emax 
> > > > > (if EII-like commands have been implemented in the Emax OS 
of 
> > > > course) 
> > > > > and to use the same bank layout as on the Emax floppy and 
> Emax 
> > > > > harddisk banks.
> > > > > 
> > > > > So despite the "5 minutes load time" note from John, I 
think 
> we 
> > > can 
> > > > > still assume that there is some specific command set in 
V3.2 
> > > which 
> > > > > enables fast bank loads. I will try to find them out during 
> the 
> > > > > weekend, either by experimenting or by looking into the OS 
> > > > > binary/disassembled code...
> > > > > 
> > > > > ///E-Synthesist
> > > > > 
> > > > > 
> > > > > 
> > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > >
> > > > > > 
> > > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
> > > > > > 
> > > > > > >
> > > > > > But the 5 minutes load time may have been reality...
> > > > > > 
> > > > > > This can explain why I don't know anyone and find no 
> > reference 
> > > at 
> > > > > all 
> > > > > > of anyone who actually used this CD-ROM drive with the 
> Emax. 
> > If 
> > > > > this 
> > > > > > 5 minutes load time is true, this must have resulted in a 
> > > > > commercial 
> > > > > > failure for OMI when they launched the Emax OMI cd 
disks... 
> > but 
> > > > > they 
> > > > > > probably released these disks also in Mac/SD format ?
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Yes, such a slow load time would have been a major 
> marketing 
> > > > > problem. I find it difficult to imagine that Emu would not 
> have 
> > > > added 
> > > > > the small amount of 
> > > > > > extra code required to load in a bank quickly via RS422. 
If 
> > > they 
> > > > > wanted to sell Emaxes then surely there was a strong 
> incentive 
> > to 
> > > > > make the sound 
> > > > > > library efficient to use. I suspect the OMI CDROM system 
> for 
> > > the 
> > > > > Emax was not a major market success because of the cost. 
The 
> > OMI 
> > > > > CDROM drive, or 
> > > > > > even a Mac with a CDROM drive, would have cost a 
> significant 
> > > > > proportion of the cost of an Emax. The average musician 
> > probably 
> > > > > would not have been 
> > > > > > able to justify that additional expense. Particularly so 
> > given 
> > > > that 
> > > > > early CDROM drives were rather fragile.
> > > > > > 
> > > > > > >
> > > > > > 
> > > > > > And yes, Emu has done strange things. E.g. the EII cdrom 
> kit 
> > > > > > supported a "folder" or "category" system: the banks on a 
> > disk 
> > > > > could 
> > > > > > be put in folders (like bank "piano" in folder "acoustic 
> > > > > keyboards") 
> > > > > > to make navigation much easier. This feature was not 
> > available 
> > > on 
> > > > > the 
> > > > > > Emax and EIII harddisks. Maybe Emu considered this to be 
a 
> > > > feature 
> > > > > of 
> > > > > > OMI and not of Emu themselves, but they could have 
learned 
> > from 
> > > > > > that...
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Surely the category organisation was only a feature of 
the 
> > OMI 
> > > > > CDROM system, as the EII had no control over it. So it was 
> > OMI's 
> > > > > CDROM format, not 
> > > > > > Emu's format. But this also gave OMI the flexibility to 
put 
> > as 
> > > > many 
> > > > > banks on the disk as they wanted and to organise them as 
they 
> > > > wanted. 
> > > > > There was 
> > > > > > no restriction on how OMI could do this as long as they 
> could 
> > > > serve 
> > > > > up the full memory image of each bank to the EII via the 
> RS422 
> > > port 
> > > > > when required.
> > > > > > 
> > > > > > Don't the Emax and the EII hard disk formats allocate a 
> fixed 
> > > > > number of banks for the disk? I believe you cannot fit any 
> more 
> > > > banks 
> > > > > on the disk even if 
> > > > > > the existing banks are only half full of samples. 
> Presumably 
> > > this 
> > > > > is because the Emax and EII use a fixed memory size for 
each 
> > bank 
> > > > and 
> > > > > the complete 
> > > > > > data for the bank is copied directly between memory and 
> disk 
> > > when 
> > > > > you load or save a bank. Each hard disk bank is a the 
> > equivalent 
> > > of 
> > > > > one floppy disk 
> > > > > > image minus the OS data. I believe the Emax II and EIII 
use 
> > > > > variable sized banks. Therefore the number of banks stored 
on 
> a 
> > > > hard 
> > > > > disk or CDROM 
> > > > > > depends on how much data is contained in each bank. But I 
> > > believe 
> > > > > there is still a limit of 100 banks per disk. 
> > > > > > 
> > > > > > >
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > RS422 Communication with the Emulator was designed based 
on 
> > > > > following 
> > > > > > key principles:
> > > > > > - all communication, including request/reply for 
parameter 
> > > > changes, 
> > > > > > occurs at 500 Kbaud
> > > > > > - a whole bank can be downloaded/loaded with one special 
> > > designed 
> > > > > > type of command (a command which actually directly 
> > reads/writes 
> > > > the 
> > > > > > RAM memory segments in which the bank data is residing)
> > > > > > - bulk data load/unload occurs with data packets sized 
256 
> > > bytes, 
> > > > > of 
> > > > > > which each byte represents 1 sample point (data is 
> > transferred 
> > > in 
> > > > > > compressed format)
> > > > > > 
> > > > > > On the Emax, they seem to have decided that choosing for 
a 
> > > > > *standard* 
> > > > > > medium speed protocol was more important than choosing 
for 
> a 
> > > > > > *proprietary* high speed protocol. So they went for the 
> MIDI 
> > > > > > SYSES/MMA approach:
> > > > > > - all basic communication, including all 
> > commands/instructions, 
> > > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI sockets 
> or 
> > > the 
> > > > > DB9 
> > > > > > RS422 port are being used.
> > > > > > - loading/unloading banks requires the full set of SYSEX 
> > > > commands. 
> > > > > > Hence to simply download the parameters of just one voice 
> of 
> > > just 
> > > > > one 
> > > > > > preset, already multiple commands must be exchanged with 
> the 
> > > > Emax. 
> > > > > > This is due to the fact that in general only one 
parameter 
> > can 
> > > be 
> > > > > > transferred per command. And this must be done at the 
slow 
> > > 31.25 
> > > > > > Kbaud speed...mmmm...
> > > > > > - bulk data (sample) load/unload occurs with data packets 
> > sized 
> > > > > only 
> > > > > > 120 bytes (MMA standard). Moreover each sample point 
> requires 
> > > 12 
> > > > > bits 
> > > > > > now instead of 8 bits on the EII since data is 
transferred 
> in 
> > > > > linear 
> > > > > > format instead of compressed format.
> > > > > > As a consequence, loading/unloading banks is much slower 
> than 
> > > on 
> > > > > the 
> > > > > > EII. Of course, once they released the Emax-II, they 
would 
> > have 
> > > > > faced 
> > > > > > problems anyway. This machine could have up to 8MB banks 
> and 
> > > > > doesn't 
> > > > > > use compression, so even at full 500 kbaud speed and 
using 
> > only 
> > > > one 
> > > > > > command - which is impossible in reality - the Emax-II 
> would 
> > > > > require 
> > > > > > at least 2.7 minutes for loading/unloading banks. 
> Fortunately 
> > > > there 
> > > > > > was something invented called SCSI :-)
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Have a look at the MIDI spec for the Emax V3.0 software. 
> The 
> > > fast 
> > > > > (RS422) dumps use a protocol based on the MIDI SDS but 
> slightly 
> > > > > modified. The 
> > > > > > sample data is dumped as 12 bit linear but the samples 
are 
> > > packed 
> > > > > so that two 12 bit samples are transferred in three 8 bit 
> > bytes. 
> > > It 
> > > > > is also of note that 
> > > > > > sending 8 bit wide data in this way violates the MIDI 
> > standard, 
> > > > as 
> > > > > bit7 is always reserved as an indicator of a status byte. 
Of 
> > > course 
> > > > > this is not really an 
> > > > > > issue here as the 500k baud RS422 data is only being 
> > > transferred 
> > > > > to/from the Emax so no other MIDI devices will ever see 
this 
> > > > > violation of the 
> > > > > > standard. But the outcome is that dumping samples as 12 
bit 
> > > only 
> > > > > takes 50% longer than dumping as 8 bit compressed. Doing a 
> > proper 
> > > > > MIDI SDS dump 
> > > > > > of 8 bit or 12 bit data actually takes the same amount of 
> > time 
> > > as 
> > > > > only 7 data bits can be transferred for each byte in the 
> > message. 
> > > > So 
> > > > > an 8 bit dump 
> > > > > > takes two bytes per sample (7 + 1) while a 12 bit dump 
also 
> > > > > requires two bytes per sample (7 + 5). 16 bit dumps are 
even 
> > > slower 
> > > > > as they require three 
> > > > > > bytes per sample (7 + 7 + 2).
> > > > > > 
> > > > > > As you have said, the failure to provide a means of 
> directly 
> > > > > transferring banks into memory via RS422 seems to be the 
> > problem 
> > > in 
> > > > > the Emax, at least as 
> > > > > > documented in the V3.0 MIDI spec. But if the V3.0 spec 
> > already 
> > > > > provides all the functions required to load banks from the 
> > CDROM 
> > > > > drive using MIDI 
> > > > > > SYSEX and RS422, then why is V3.2 or the SE software 
> claimed 
> > to 
> > > > add 
> > > > > OMI CDROM support? It still seems likely to me that some 
> extra 
> > > > > functions were 
> > > > > > added in those versions to support fast bank loading via 
> > RS422. 
> > > > If 
> > > > > not, then the OMI CDROM drive would have to be converting 
the 
> 8 
> > > bit 
> > > > > compressed 
> > > > > > sample data on the CDROM to 12 bit linear in order to 
dump 
> > the 
> > > > > samples into the Emax. The Emax would then have to convert 
> the 
> > 12 
> > > > bit 
> > > > > linear samples 
> > > > > > back to compressed 8 bit samples. The transfer of samples 
> > would 
> > > > > also take 50% longer for 12 bit linear compared to 8 bit 
> > > > compressed. 
> > > > > And of course 
> > > > > > there would be no way for sequencer data included in the 
> bank 
> > > to 
> > > > be 
> > > > > loaded into the Emax. I could be wrong, but it just seems 
> > > unlikely 
> > > > > Emu would have 
> > > > > > made it so difficult when a small software update to the 
> Emax 
> > > > could 
> > > > > make bank dumping work in much the same way as the EII.
> > > > > > 
> > > > > > >
> > > > > > 
> > > > > > Nevertheless I will still do some experiments to find out 
> if 
> > > the 
> > > > > Emax 
> > > > > > OS doesn't have any "fast bank load" commands... 
> > > > > > By the way: does anyone know whether the binary code of 
the 
> > > Emax 
> > > > OS 
> > > > > > can easily be de-compiled/disassembled in some way in 
order 
> > to 
> > > > get 
> > > > > > some kind of source code ? Is a simple Z80 disassembler 
> > > > sufficient ?
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Unfortunately it seems the only way is to experiment and 
> see 
> > > what 
> > > > > can be uncovered. The Emax NS32000 main CPU code can be 
> > > > disassembled 
> > > > > but it is 
> > > > > > not a common processor. The hard part of analyzing the 
> > > > disassembled 
> > > > > code is working out where the program and data begins and 
> ends 
> > as 
> > > > > well as what 
> > > > > > interrupt routines are being handled at runtime and how 
> they 
> > > > > interact. You would need to combine together the code from 
> the 
> > > disk 
> > > > > OS image and the 
> > > > > > EPROM into a processor memory map. Various hardware 
> > peripherals 
> > > > > will also probably exist at certain addresses in the memory 
> > map. 
> > > To 
> > > > > pull it all 
> > > > > > together you will ideally have the circuit schematics, 
the 
> > > memory 
> > > > > map, CPU/chip documentation plus a detailed design 
> description 
> > of 
> > > > how 
> > > > > the system 
> > > > > > works. Often much of this data can be found in the 
product 
> > > > service 
> > > > > manual. Then you need to determine which routines are 
called 
> > when 
> > > > > MIDI/RS422 
> > > > > > interrupts are handled. Testing with a logic analyzer 
> probing 
> > > the 
> > > > > CPU would certainly make that easier.
> > > > > > 
> > > > > > /Tristan
> > > > > > 
> > > > > > >
> > > > > > 
> > > > > > 
> > > > > > ///E-Synthesist 
> > > > > > 
> > > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > > >
> > > > > > > That seems excessively slow, as the EII could load a 
> > similar 
> > > > > sized 
> > > > > > bank from the same CDROM 
> > > > > > > drive in 12 seconds. Its hard to imagine Emu would not 
> have 
> > > > > > implemented a similar load time on 
> > > > > > > the Emax if all it took was adding a software routine. 
> But 
> > > then 
> > > > > > again, stranger things have 
> > > > > > > happened...
> > > > > > > 
> > > > > > > /Tristan
> > > > > > > 
> > > > > > > Quoting John Silveria II <john@>:
> > > > > > > 
> > > > > > > > Somewhere, and I can't remember where, I read that 
the 
> CD-
> > > Rom 
> > > > > > drive
> > > > > > > > took 
> > > > > > > > up to 5 minutes to load a bank. I wish I could 
remember 
> > > > where. 
> > > > > So
> > > > > > > > indeed 
> > > > > > > > it was not only as slow as typical SYSEX load, it 
could 
Show quoted textHide quoted text
> > > > > actually 
> > > > > > take
> > > > > > > > 
> > > > > > > > longer.
> > > > > > > >
> >
>

Re: RS422 fun

2008-11-22 by esynthesist

You made be thinking again.

When I started my experiments I asked for some advice on serial 
communication on a Dutch electronics internet group. One of my 
questions was whether the 4 handshake signals on the standard RS422 
(RTS+, RTS-, CTS+, CTS-) can be compared in some way to the HSKi and 
HSKo signals of the Mac serial port. Specifically I was also asking 
what to do with the + and - signals, given the fact that the 
Emax/Emulator sends a clock signal which is going + and - on the same 
line, while the RS422 expects seperated opposite signals.
I also asked if an independent clock in the PC RS422, running at 
500kbaud would be sufficient, instead of external clocking.  
At the end the experts on this group confirmed that an independent 
clock should be OK, even if it's not clocking exactly at the same 
speed of the Emulator II and that phasing problems can be ignored.
One of the arguments they based their conclusion on was that the 
Emulator II communication protocol is *asynchronous* (as also stated 
in the technical documents of the EII).
Were they wrong ?

And do you know the most appropriate wiring between the 4 
RS422 "clock" pins and the single clock pin of the Emax/Emulator II ?

Or do I understand you completely wrong, and are those "external 
clockable RS422 devices for the PC" not using these 4 signals but 
even another one ?

By the way: what exact link to which RS422 device are you talking 
about ? I reviewed the messages but didn't find a direct link ?

///E-Synthesist

--- In emax@yahoogroups.com, mr julian <jujulilianan@...> wrote:
>
> so the non-USB port didn't work?
> 
> That link I sent the other week was to a 422 adapter card that was 
able 
> to run synchronous.... is the issue that this card can only be 
clock 
> master, or something???
> 
> 
> PS, you do NOT need a digital storage oscilloscope. A logic 
analyser 
> will tell you way more here.
> 
> 
> 
> esynthesist wrote:
> 
> >Thanks Tristan.
> >
> >I'm wondering though: even if we find the actual cause of the 
problem 
> >(timing or signal level), I guess there's not much we can do to 
solve 
> >the problem. Besides making a custom communication board of course.
> >Because I don't think characteristics such as "clock to data 
> >relationship" can be configured on any normal commercial RS422 
port 
> >device for PCs, right ?
> >That's in fact the only reason why I didn't invest in a scope yet: 
> >exactly knowing the problem would be nice, but not being able to 
> >solve it would be frustrating :-)
> >Man ! I would love the standard PC RS422 ports to be externally 
> >clockable ! Why is this (once again) one of those "Mac"-only 
> >features !
> >
> >Question: the RS422 communication "timeout period" on the Emax can 
be 
> >configured with a SYSEX command (from 1 to 127 seconds). But I 
guess 
> >this is not something that can help on the lowel level data 
> >syncronization problem we are dealing with here, right ? I 
> >guess "our" problem is more related to the speed at which a stream 
of 
Show quoted textHide quoted text
> >bits (as a whole) is entering the Emax port ?
> >
> >///E-Synthesist 
> >
> >
> >  
> >
> >  
> >
>

Re: RS422 fun

2008-11-22 by esynthesist

About the hardware I have used until now:

Serial ports:
- Meilhaus Redcom USB-COMI RS422 USB port. Also sold with other brand 
names such as Easysync; very popular one. --> This is the one I have 
best results with. Internal clockable at 500kbaud. 
- Moxa Uport 1150 RS422/RS232 USB port. This device does not support 
RTS/CTS handshaking for RS422 and is not internally clockable at 500 
kbaud. So it's useless :-)
- Exsys EX-1362 double RS422 PCMCIA card. This one has the same 
features as the Meilhaus but the results where less reliable.
- Ednet RS232 USB adapter 84204. A cheap RS232 device, just to see if 
this wouldn't work. It didn't. 

Cable/wiring:
Until now I only used the GND and DATA signals, so I connected 5 pins 
of the Emax/Emulator II to the PC RS422 as follows:
- Emax PIN 3 (GND)    to    RS422 PIN 5 (GND)
- Emax PIN 4 (RXD+)   to    RS422 PIN 2 (TXD+)
- Emax PIN 5 (RXD-)   to    RS422 PIN 1 (TXD-)
- Emax PIN 8 (TXD+)   to    RS422 PIN 3 (RXD+)
- Emax PIN 9 (TXD-)   to    RS422 PIN 4 (RXD-)
The cable is a 10-wire shielded cable of 1.5 meters long.

(I already spent 300 EUR on serial devices, so I'm not planning to 
buy additional ones anymore :-)

Final note: before I started this project with the EII/Emax, I had 
never programmed/monitored a serial device before, so let's say that 
my hardware/RS422 experience is low but increasing ...

///E-Synthesist

--- In emax@yahoogroups.com, tu@... wrote:
>
> I think the solution here really depends on the actual cause of the 
problem. It may even be just some simple thing like the cable wiring 
or a driver 
> setting for the PC RS422 hardware. It would be helpful if you could 
provide some more detail on the hardware you are using. For a start, 
the exact 
> brand and model number of the RS422 interfaces and cables plus the 
wiring diagrams of the cables.
> 
> The best case would be if you could get an existing PC RS422 
interface to work with the Emax with no hardware modification. 
Otherwise the solutions 
> start to get more complicated, such as modifying circuits, building 
an interface board or even having a microcontroller sitting between 
the PC and the 
> Emax doing protocol translation. But now you have the Emax 
protocols worked out I believe a solution can be achieved. 
> 
> If you don't have the tools to measure what is going on in the 
interface circuits then you will have difficulty sorting this out. I 
would suggest using a 
> digital oscilloscope to measure the TX and RX data signals plus the 
500kHz clock at the Emax 6850 UART chip when the Emax is actually 
communicating 
> with both the Mac and the PC. You will need at least two 
oscilloscope channels to see the clock and the data simultaneously. 
More channels would be 
> nice, but the TX data and clock together and RX data and clock 
together are the first things to look at. You could also use a logic 
analyzer but I think an 
> oscilloscope is better because it will show the actual waveforms, 
not just the logic transitions.
> 
> Unfortunately the Emax and Mac RS422 interfaces are products of 
their times, and times move on. No doubt it was a reasonable decision 
to implement 
> the interface to the host computer this way back in the 1980s.
> 
> The sysex timeout is related to the dumping protocol and has no 
real bearing on what happens with the clocking at the data tranfer 
layer. But you could 
> always experiment with it to see if it makes any difference to the 
problem you are seeing. At this stage we do not know for sure that 
the problem is at 
> the low level.
> 
> I am not sure how much experience you have with hardware and 
communications troubleshooting but I am happy to help or provide 
further if you 
> would like to pursue this. As I said in a previous email, I would 
like to see a general solution that would allow any of the Emu RS422 
equipped samplers 
> to be connected to a modern PC for sample dumping and/or bank 
transfer (where applicable). You have done fabulous work with the 
EMXP program and 
> seem to have the software and Emu formats and protocols worked out. 
So I think getting this happening should not be too hard :)
> 
> /Tristan
> 
> Saturday, November 22, 2008, 12:00:21 AM, you wrote:
> 
> >
> Thanks Tristan.
> 
> I'm wondering though: even if we find the actual cause of the 
problem 
> (timing or signal level), I guess there's not much we can do to 
solve 
> the problem. Besides making a custom communication board of course.
> Because I don't think characteristics such as "clock to data 
> relationship" can be configured on any normal commercial RS422 port 
> device for PCs, right ?
> That's in fact the only reason why I didn't invest in a scope yet: 
> exactly knowing the problem would be nice, but not being able to 
> solve it would be frustrating :-)
> Man ! I would love the standard PC RS422 ports to be externally 
> clockable ! Why is this (once again) one of those "Mac"-only 
> features !
> 
> Question: the RS422 communication "timeout period" on the Emax can 
be 
> configured with a SYSEX command (from 1 to 127 seconds). But I 
guess 
> this is not something that can help on the lowel level data 
> syncronization problem we are dealing with here, right ? I 
> guess "our" problem is more related to the speed at which a stream 
of 
> bits (as a whole) is entering the Emax port ?
> 
> ///E-Synthesist 
> 
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > Yes, an oscilloscope is what you need. I suggest getting a 
digital 
> model as it should allow you to capture and store the signals you 
are 
> measuring. Some 
> > high end multimeters also have oscilloscope functions, but check 
> the bandwidth is well above the highest frequencies you will need 
to 
> measure. An audio 
> > card is not suitable for this task.
> > 
> > I did a search on the Mac serial port and it seems that while the 
> output voltage levels are slightly non standard they should not 
> present any problems for 
> > the Emax 9637 RS422 receiver chip. I only have the Emax II 
> schematics but I believe the RS422 interface should be the same as 
> the Emax. The 9637 
> > circuit doesn't appear to have any EMI supression or termination 
> other than a pullup to +5V on the noninverting input. So the Emax 
is 
> relying on the 
> > sending circuit to ensure a reasonably clean signal arrives. The 
> Mac has an EMI filter on its RS422 port but I am not sure what your 
> PC RS422 port may 
> > have.
> > 
> > Another thing to look at is the relationship between the 500kHz 
> clock the Emax sends out and the data that is sent back to the Emax 
> from the PC. The 
> > 6850 UART in the Emax relies on a this being within a certain 
> timing range. If the clock to data relationship from the PC RS422 
> port is not the same as 
> > from the Mac then this could cause problems. The same would also 
> occur if the PC RS422 transmit clock is drifting because is not 
> locked to the same 
> > clock that it is receiving from the Emax. Of course the data 
being 
> sent from the Emax to the PC will be ok because the clock and data 
> are transmitted 
> > together with the correct timing relationship.
> > 
> > /Tristan
> > 
> > Tuesday, November 18, 2008, 3:58:48 AM, you wrote:
> > 
> > >
> > To have 100% certainty about the actual problem I should indeed 
do 
> > some measurements with an oscilloscope... but I don't have one.
> > I was (and still) am thinking about buying one, either analog or 
> > digital. Until now I only did some measurements with an external 
> > audio card acting as a wave recorder, but its sampling frequency 
> and 
> > bandwith are - of course - insufficient to do proper measurements 
> on 
> > 500kbaud signals. What I do see however - even with this method - 
> is 
> > that the amplitude level of the Mac signal is much higher than 
the 
> PC 
> > signal.
> > On the other hand, if the RS422 of the Emax is standard, then I 
> > shouldn't have any problem. Mmmm... 
> > Yes, the best solution would consist of a custom RS422 port for 
the 
> > PC which can even be externally clocked. But I'm not an 
electronics 
> > specialist so it will take a looooonnnnng time before I will end 
up 
> > with a working set :-)
> > 
> > ///E-Synthesist
> > 
> > --- In emax@yahoogroups.com, tu@ wrote:
> > >
> > > I am not sure about the Mac circuitry but the RS422 interface 
on 
> > the Emax should just be standard 
> > > 9637 and 9638 RS422 buffers. The input threshold on the 9637 
> > receiver is specified to be +/- 
> > > 200mV so it should work with voltages higher than that. Do you 
> have 
> > an oscilloscope that you can 
> > > use to probe the 9637 while it is receiving data? If so, you 
> could 
> > compare when receiving data 
> > > from the Mac and the PC via RS422.
> > > 
> > > Its not a priority, but I think it would be worthwhile to have 
an 
> > RS422 interface that would allow 
> > > any PC to be used for sample dumping to the Emax I, Emax II, 
EII, 
> > EIII and EIIIx as well as bank 
> > > transfer with the EII and Emax. Even if an interface box cost 
> some 
> > money I feel there would be a 
> > > demand given the numbers of these samplers still in use. The 
Emu 
> > world cannot live on old Macs 
> > > alone :)
> > > 
> > > /Tristan
> > > 
> > > Monday, November 17, 2008, 3:24:57 AM, you wrote:
> > > 
> > > >
> > > After some additional testing I'm pretty sure the problems are 
> not 
> > > caused by timing differences, but by voltage levels. 
> > > I received a PCMCIA RS422 port this week, and this thing has 
even 
> > > more problems with communicating with the EII and the Emax than 
> my 
> > > USB/RS422 converter device. And again the communication problem 
> is 
> > to 
> > > be found in the PC->Emax transmit part, not in the receive part.
> > > I mentioned before that the Mac RS422 is sending very high 
signal 
> > > levels (higher than "officially" allowed by the RS422 
standard). 
> > The 
> > > Emu samplers seem to rely on these high signals.
> > > Conclusion: I give up the current experiments. Perhaps some 
time 
> in 
> > > the future I'll try to make a device based on Mac circuits...
> > > 
> > > --- In emax@yahoogroups.com, tu@ wrote:
> > > >
> > > > Ok, that is interesting.
> > > > 
> > > > An alternative to direct connection of the RS422 to the PC 
> would 
> > be 
> > > a microcontroller sitting 
> > > > between the PC and sampler. I think someone suggested that 
> > before. 
> > > It could respond to the 
> > > > sampler with tight timing but handle the loose timing over 
the 
> PC 
> > > connection. I guess the PC side 
> > > > could be implemented with either RS-232 or USB. But obviously 
> USB 
> > > would require a lot more 
> > > > coding than simply translating RS422 and RS232 port protocols 
> > with 
> > > a bit of buffering in between.
> > > > 
> > > > /Tristan
> > > > 
> > > > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
> > > > 
> > > > >
> > > > Yes it's about the same concept as on the EII: taking an 
exact 
> > dump 
> > > > of the internal Emax memory at 500 kbaud in both directions. 
Or 
> > in 
> > > > other words... transferring an EMX file across the serial 
line 
> > > > (except for the EMX 39 byte header string of course).
> > > > 
> > > > But there are two major drawbacks compared with the EII: 
> > > > 1/ the Emax uses the MMA standard to accomplish this dump, 
> > meaning 
> > > > that the data is sent in packets of 120 bytes instead of 256 
> > bytes, 
> > > > which is slower.
> > > > 2/ it's not possible to dump specific memory segments, the 
> whole 
> > > > thing must be dumped in one sequential loop from the very 
> > beginning 
> > > > (position 0) to the very end (position 552959). 
> > > > 
> > > > The second one is a BIG problem: it means that if something 
> goes 
> > > > wrong (like a bad packet) the whole dump must be restarted.
> > > > And... since the PC RS422 communication line with the Emax is 
> not 
> > > > optimal, this kind of error will for sure occur during a bank 
> > > > transfer. On the EII, this means simply re-asking for the 
> > > particular 
> > > > bad data packet, but on the Emax you have to start all over 
> again.
> > > > 
> > > > In practice this means that a full load/unload is simply not 
> > > possible 
> > > > with my current hardware (USB-RS422 and USB-RS232 converters 
of 
> > all 
> > > > kinds) because the loop is restarted endlessly. At the end of 
> the 
> > > > week I'll try an non-USB port device, I hope that one will 
work.
> > > > If not, a custom RS422 PC port must be built for the 
Emax/EII, 
> > > based 
> > > > on the RS422 circuits & ICs of the Mac.
> > > > 
> > > > ///E-Synthesist
> > > > 
> > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > >
> > > > > Fantastic! So, is it the same method that the EII uses for 
> bank 
> > > > transfer or something else? Is there 
> > > > > any chance you could document the protocol? 
> > > > > 
> > > > > I think 25-30 seconds should be acceptable for Emax I bank 
> > loads. 
> > > > At least it provides an option 
> > > > > for those who can't or don't want to add SCSI. 
> > > > > 
> > > > > The Emax II load time does sound a bit slow. But it might 
> still 
> > > be 
> > > > of use if someone had a working 
> > > > > Emax II with a dead SCSI chip.
> > > > > 
> > > > > Out of interest, can the Emax II directly load an Emax I 
bank 
> > > (with 
> > > > compressed 8 bit samples) in 
> > > > > this way? 
> > > > > 
> > > > > /Tristan
> > > > > 
> > > > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
> > > > > 
> > > > > >
> > > > > After some experiments during the weekend, the current 
status 
> > of 
> > > my 
> > > > > little RS422 project is that I know how to do *fast* bank 
> > > > > loads/unloads on the Emax via RS422. 
> > > > > This should reduce the total data transfer time to 25-30 
> > seconds 
> > > on 
> > > > > the Emax-I instead of the 2-3 minutes of Alchemy. Most 
> probably 
> > > > this 
> > > > > was also the total load time of the OMI CDS3 system, which 
> is - 
> > > > let's 
> > > > > say - "acceptable"... 
> > > > > That's about the same speed as loading from a floppy :-) 
but 
> > the 
> > > > > biggest advantage would be that one would have immediate 
> access 
> > > to 
> > > > > hundreds of banks on the PC harddrive instead of having to 
> copy 
> > > > > individual banks to floppy disks first... 
> > > > > Still SCSI is a much better alternative... for those having 
a 
> > > rev2 
> > > > or 
> > > > > rev3 board, and for those using the Emax-II. BTW at RS422 
> > speed, 
> > > > the 
> > > > > data transfer time on a fully loaded Emax-II Turbo 8M would 
> be 
> > > > about 
> > > > > 7 minutes :-). Fortunately every Emax-II is equipped with 
> SCSI.
> > > > > 
> > > > > I have to write some decent software now which supports the 
> > full 
> > > > Emax 
> > > > > handshaking protocol. But I'm pretty sure that the USB<--
> >RS422 
> > > > > converters will not be the best solution for this 
> > communication - 
> > > > > just like with the EII the communication seems to be quite 
> > > > unreliable 
> > > > > when transmitting data from the PC to the Emax, as a 
> > consequence 
> > > > the 
> > > > > total transfer time increases dramatically due to 
handshaking 
> > > > > overhead. 
> > > > > At the end of the week I will have a PCCard RS422 port on 
my 
> > > > laptop. 
> > > > > This piece of hardware does not suffer from USB latency, so 
I 
> > > hope 
> > > > it 
> > > > > will work better...
> > > > > 
> > > > > ///E-Synthesist
> > > > > 
> > > > > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@> 
> wrote:
> > > > > >
> > > > > > Yes, I was also thinking there must be some dedicated 
> command 
> > > > (set) 
> > > > > > for fast load/unload. But the fact that John remembered a 
> > load 
> > > > time 
> > > > > > of 5 minutes for the OMI cdroms made me doubt again... On 
> the 
> > > > other 
> > > > > > hand it is true that OMI cdroms could only be used after 
> the 
> > > > > release 
> > > > > > of OS 3.2, so this is indeed an indication that 
additional 
> > > > commands 
> > > > > > have been added, or at least some changes have been 
> applied. 
> > I 
> > > > also 
> > > > > > observed that the v 3.2 MIDI protocol is not 100% 
behaving 
> as 
> > > > > > described in the v 3.0 document, e.g. the timeout 
handling 
> is 
> > > > > > different. So there are also changes in the 'normal' 
> > SYSEX/MMA 
> > > > > > protocol.
> > > > > > By the way: the OMI drive also required a firmware update 
> in 
> > > > order 
> > > > > to 
> > > > > > be compatible with the Emax. Question is of course 
whether 
> > this 
> > > > was 
> > > > > > just a small firmware update (to support the newly added 
> > > commands 
> > > > > in 
> > > > > > the Emax OS) or a huge piece of Emax-specific code (to 
> > > implement 
> > > > > the 
> > > > > > full SYSEX/MMA command set - which is indeed quite 
> > unlikely) ...
> > > > > > 
> > > > > > The Emax-II and EIII indeed have a filesystem which is 
> > > optimized 
> > > > > for 
> > > > > > handling different banksizes; I have the specs here 
because 
> I 
> > > > > needed 
> > > > > > them for EMXP. The EII and Emax are using filesystems 
with 
> > > fixed 
> > > > > > filesizes in a sequential order.
> > > > > > 
> > > > > > Since I don't have any Emax OMI cdrom disk I'm not even 
> sure 
> > > > > whether 
> > > > > > the banks on these disks are "EMX-like" 8-bit images or 
> > > expanded 
> > > > 12 
> > > > > > bit images. It makes sense that they are 8-bit, because 
> this 
> > > > > allowed 
> > > > > > OMI to put more banks on a CD, to transfer them faster to 
> the 
> > > > Emax 
> > > > > > (if EII-like commands have been implemented in the Emax 
OS 
> of 
> > > > > course) 
> > > > > > and to use the same bank layout as on the Emax floppy and 
> > Emax 
> > > > > > harddisk banks.
> > > > > > 
> > > > > > So despite the "5 minutes load time" note from John, I 
> think 
> > we 
> > > > can 
> > > > > > still assume that there is some specific command set in 
> V3.2 
> > > > which 
> > > > > > enables fast bank loads. I will try to find them out 
during 
> > the 
> > > > > > weekend, either by experimenting or by looking into the 
OS 
> > > > > > binary/disassembled code...
> > > > > > 
> > > > > > ///E-Synthesist
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > > >
> > > > > > > 
> > > > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
> > > > > > > 
> > > > > > > >
> > > > > > > But the 5 minutes load time may have been reality...
> > > > > > > 
> > > > > > > This can explain why I don't know anyone and find no 
> > > reference 
> > > > at 
> > > > > > all 
> > > > > > > of anyone who actually used this CD-ROM drive with the 
> > Emax. 
> > > If 
> > > > > > this 
> > > > > > > 5 minutes load time is true, this must have resulted in 
a 
> > > > > > commercial 
> > > > > > > failure for OMI when they launched the Emax OMI cd 
> disks... 
> > > but 
> > > > > > they 
> > > > > > > probably released these disks also in Mac/SD format ?
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Yes, such a slow load time would have been a major 
> > marketing 
> > > > > > problem. I find it difficult to imagine that Emu would 
not 
> > have 
> > > > > added 
> > > > > > the small amount of 
> > > > > > > extra code required to load in a bank quickly via 
RS422. 
> If 
> > > > they 
> > > > > > wanted to sell Emaxes then surely there was a strong 
> > incentive 
> > > to 
> > > > > > make the sound 
> > > > > > > library efficient to use. I suspect the OMI CDROM 
system 
> > for 
> > > > the 
> > > > > > Emax was not a major market success because of the cost. 
> The 
> > > OMI 
> > > > > > CDROM drive, or 
> > > > > > > even a Mac with a CDROM drive, would have cost a 
> > significant 
> > > > > > proportion of the cost of an Emax. The average musician 
> > > probably 
> > > > > > would not have been 
> > > > > > > able to justify that additional expense. Particularly 
so 
> > > given 
> > > > > that 
> > > > > > early CDROM drives were rather fragile.
> > > > > > > 
> > > > > > > >
> > > > > > > 
> > > > > > > And yes, Emu has done strange things. E.g. the EII 
cdrom 
> > kit 
> > > > > > > supported a "folder" or "category" system: the banks on 
a 
> > > disk 
> > > > > > could 
> > > > > > > be put in folders (like bank "piano" in 
folder "acoustic 
> > > > > > keyboards") 
> > > > > > > to make navigation much easier. This feature was not 
> > > available 
> > > > on 
> > > > > > the 
> > > > > > > Emax and EIII harddisks. Maybe Emu considered this to 
be 
> a 
> > > > > feature 
> > > > > > of 
> > > > > > > OMI and not of Emu themselves, but they could have 
> learned 
> > > from 
> > > > > > > that...
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Surely the category organisation was only a feature of 
> the 
> > > OMI 
> > > > > > CDROM system, as the EII had no control over it. So it 
was 
> > > OMI's 
> > > > > > CDROM format, not 
> > > > > > > Emu's format. But this also gave OMI the flexibility to 
> put 
> > > as 
> > > > > many 
> > > > > > banks on the disk as they wanted and to organise them as 
> they 
> > > > > wanted. 
> > > > > > There was 
> > > > > > > no restriction on how OMI could do this as long as they 
> > could 
> > > > > serve 
> > > > > > up the full memory image of each bank to the EII via the 
> > RS422 
> > > > port 
> > > > > > when required.
> > > > > > > 
> > > > > > > Don't the Emax and the EII hard disk formats allocate a 
> > fixed 
> > > > > > number of banks for the disk? I believe you cannot fit 
any 
> > more 
> > > > > banks 
> > > > > > on the disk even if 
> > > > > > > the existing banks are only half full of samples. 
> > Presumably 
> > > > this 
> > > > > > is because the Emax and EII use a fixed memory size for 
> each 
> > > bank 
> > > > > and 
> > > > > > the complete 
> > > > > > > data for the bank is copied directly between memory and 
> > disk 
> > > > when 
> > > > > > you load or save a bank. Each hard disk bank is a the 
> > > equivalent 
> > > > of 
> > > > > > one floppy disk 
> > > > > > > image minus the OS data. I believe the Emax II and EIII 
> use 
> > > > > > variable sized banks. Therefore the number of banks 
stored 
> on 
> > a 
> > > > > hard 
> > > > > > disk or CDROM 
> > > > > > > depends on how much data is contained in each bank. But 
I 
> > > > believe 
> > > > > > there is still a limit of 100 banks per disk. 
> > > > > > > 
> > > > > > > >
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > RS422 Communication with the Emulator was designed 
based 
> on 
> > > > > > following 
> > > > > > > key principles:
> > > > > > > - all communication, including request/reply for 
> parameter 
> > > > > changes, 
> > > > > > > occurs at 500 Kbaud
> > > > > > > - a whole bank can be downloaded/loaded with one 
special 
> > > > designed 
> > > > > > > type of command (a command which actually directly 
> > > reads/writes 
> > > > > the 
> > > > > > > RAM memory segments in which the bank data is residing)
> > > > > > > - bulk data load/unload occurs with data packets sized 
> 256 
> > > > bytes, 
> > > > > > of 
> > > > > > > which each byte represents 1 sample point (data is 
> > > transferred 
> > > > in 
> > > > > > > compressed format)
> > > > > > > 
> > > > > > > On the Emax, they seem to have decided that choosing 
for 
> a 
> > > > > > *standard* 
> > > > > > > medium speed protocol was more important than choosing 
> for 
> > a 
> > > > > > > *proprietary* high speed protocol. So they went for the 
> > MIDI 
> > > > > > > SYSES/MMA approach:
> > > > > > > - all basic communication, including all 
> > > commands/instructions, 
> > > > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI 
sockets 
> > or 
> > > > the 
> > > > > > DB9 
> > > > > > > RS422 port are being used.
> > > > > > > - loading/unloading banks requires the full set of 
SYSEX 
> > > > > commands. 
> > > > > > > Hence to simply download the parameters of just one 
voice 
> > of 
> > > > just 
> > > > > > one 
> > > > > > > preset, already multiple commands must be exchanged 
with 
> > the 
> > > > > Emax. 
> > > > > > > This is due to the fact that in general only one 
> parameter 
> > > can 
> > > > be 
> > > > > > > transferred per command. And this must be done at the 
> slow 
> > > > 31.25 
> > > > > > > Kbaud speed...mmmm...
> > > > > > > - bulk data (sample) load/unload occurs with data 
packets 
> > > sized 
> > > > > > only 
> > > > > > > 120 bytes (MMA standard). Moreover each sample point 
> > requires 
> > > > 12 
> > > > > > bits 
> > > > > > > now instead of 8 bits on the EII since data is 
> transferred 
> > in 
> > > > > > linear 
> > > > > > > format instead of compressed format.
> > > > > > > As a consequence, loading/unloading banks is much 
slower 
> > than 
> > > > on 
> > > > > > the 
> > > > > > > EII. Of course, once they released the Emax-II, they 
> would 
> > > have 
> > > > > > faced 
> > > > > > > problems anyway. This machine could have up to 8MB 
banks 
> > and 
> > > > > > doesn't 
> > > > > > > use compression, so even at full 500 kbaud speed and 
> using 
> > > only 
> > > > > one 
> > > > > > > command - which is impossible in reality - the Emax-II 
> > would 
> > > > > > require 
> > > > > > > at least 2.7 minutes for loading/unloading banks. 
> > Fortunately 
> > > > > there 
> > > > > > > was something invented called SCSI :-)
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Have a look at the MIDI spec for the Emax V3.0 
software. 
> > The 
> > > > fast 
> > > > > > (RS422) dumps use a protocol based on the MIDI SDS but 
> > slightly 
> > > > > > modified. The 
> > > > > > > sample data is dumped as 12 bit linear but the samples 
> are 
> > > > packed 
> > > > > > so that two 12 bit samples are transferred in three 8 bit 
> > > bytes. 
> > > > It 
> > > > > > is also of note that 
> > > > > > > sending 8 bit wide data in this way violates the MIDI 
> > > standard, 
> > > > > as 
> > > > > > bit7 is always reserved as an indicator of a status byte. 
> Of 
> > > > course 
> > > > > > this is not really an 
> > > > > > > issue here as the 500k baud RS422 data is only being 
> > > > transferred 
> > > > > > to/from the Emax so no other MIDI devices will ever see 
> this 
> > > > > > violation of the 
> > > > > > > standard. But the outcome is that dumping samples as 12 
> bit 
> > > > only 
> > > > > > takes 50% longer than dumping as 8 bit compressed. Doing 
a 
> > > proper 
> > > > > > MIDI SDS dump 
> > > > > > > of 8 bit or 12 bit data actually takes the same amount 
of 
> > > time 
> > > > as 
> > > > > > only 7 data bits can be transferred for each byte in the 
> > > message. 
> > > > > So 
> > > > > > an 8 bit dump 
> > > > > > > takes two bytes per sample (7 + 1) while a 12 bit dump 
> also 
> > > > > > requires two bytes per sample (7 + 5). 16 bit dumps are 
> even 
> > > > slower 
> > > > > > as they require three 
> > > > > > > bytes per sample (7 + 7 + 2).
> > > > > > > 
> > > > > > > As you have said, the failure to provide a means of 
> > directly 
> > > > > > transferring banks into memory via RS422 seems to be the 
> > > problem 
> > > > in 
> > > > > > the Emax, at least as 
> > > > > > > documented in the V3.0 MIDI spec. But if the V3.0 spec 
> > > already 
> > > > > > provides all the functions required to load banks from 
the 
> > > CDROM 
> > > > > > drive using MIDI 
> > > > > > > SYSEX and RS422, then why is V3.2 or the SE software 
> > claimed 
> > > to 
> > > > > add 
> > > > > > OMI CDROM support? It still seems likely to me that some 
> > extra 
> > > > > > functions were 
> > > > > > > added in those versions to support fast bank loading 
via 
> > > RS422. 
> > > > > If 
> > > > > > not, then the OMI CDROM drive would have to be converting 
> the 
> > 8 
> > > > bit 
> > > > > > compressed 
> > > > > > > sample data on the CDROM to 12 bit linear in order to 
> dump 
> > > the 
> > > > > > samples into the Emax. The Emax would then have to 
convert 
> > the 
> > > 12 
> > > > > bit 
> > > > > > linear samples 
> > > > > > > back to compressed 8 bit samples. The transfer of 
samples 
> > > would 
> > > > > > also take 50% longer for 12 bit linear compared to 8 bit 
> > > > > compressed. 
> > > > > > And of course 
> > > > > > > there would be no way for sequencer data included in 
the 
> > bank 
> > > > to 
> > > > > be 
> > > > > > loaded into the Emax. I could be wrong, but it just seems 
> > > > unlikely 
> > > > > > Emu would have 
> > > > > > > made it so difficult when a small software update to 
the 
> > Emax 
> > > > > could 
> > > > > > make bank dumping work in much the same way as the EII.
> > > > > > > 
> > > > > > > >
> > > > > > > 
> > > > > > > Nevertheless I will still do some experiments to find 
out 
> > if 
> > > > the 
> > > > > > Emax 
> > > > > > > OS doesn't have any "fast bank load" commands... 
> > > > > > > By the way: does anyone know whether the binary code of 
> the 
> > > > Emax 
> > > > > OS 
> > > > > > > can easily be de-compiled/disassembled in some way in 
> order 
> > > to 
> > > > > get 
> > > > > > > some kind of source code ? Is a simple Z80 disassembler 
> > > > > sufficient ?
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Unfortunately it seems the only way is to experiment 
and 
> > see 
> > > > what 
> > > > > > can be uncovered. The Emax NS32000 main CPU code can be 
> > > > > disassembled 
> > > > > > but it is 
> > > > > > > not a common processor. The hard part of analyzing the 
> > > > > disassembled 
> > > > > > code is working out where the program and data begins and 
> > ends 
> > > as 
> > > > > > well as what 
> > > > > > > interrupt routines are being handled at runtime and how 
> > they 
> > > > > > interact. You would need to combine together the code 
from 
> > the 
> > > > disk 
> > > > > > OS image and the 
> > > > > > > EPROM into a processor memory map. Various hardware 
> > > peripherals 
> > > > > > will also probably exist at certain addresses in the 
memory 
> > > map. 
> > > > To 
> > > > > > pull it all 
> > > > > > > together you will ideally have the circuit schematics, 
> the 
> > > > memory 
> > > > > > map, CPU/chip documentation plus a detailed design 
> > description 
> > > of 
> > > > > how 
> > > > > > the system 
> > > > > > > works. Often much of this data can be found in the 
> product 
> > > > > service 
> > > > > > manual. Then you need to determine which routines are 
> called 
> > > when 
> > > > > > MIDI/RS422 
> > > > > > > interrupts are handled. Testing with a logic analyzer 
> > probing 
> > > > the 
> > > > > > CPU would certainly make that easier.
> > > > > > > 
> > > > > > > /Tristan
> > > > > > > 
> > > > > > > >
> > > > > > > 
> > > > > > > 
> > > > > > > ///E-Synthesist 
> > > > > > > 
> > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > > > >
> > > > > > > > That seems excessively slow, as the EII could load a 
> > > similar 
> > > > > > sized 
> > > > > > > bank from the same CDROM 
> > > > > > > > drive in 12 seconds. Its hard to imagine Emu would 
not 
> > have 
> > > > > > > implemented a similar load time on 
> > > > > > > > the Emax if all it took was adding a software 
routine. 
Show quoted textHide quoted text
> > But 
> > > > then 
> > > > > > > again, stranger things have 
> > > > > > > > happened...
> > > > > > > > 
> > > > > > > > /Tristan
> > > > > > > > 
> > > > > > > > Quoting John Silveria II <john@>:
> > > > > > > > 
> > > > > > > > > Somewhere, and I can't remember where, I read that 
> the 
> > CD-
> > > > Rom 
> > > > > > > drive
> > > > > > > > > took 
> > > > > > > > > up to 5 minutes to load a bank. I wish I could 
> remember 
> > > > > where. 
> > > > > > So
> > > > > > > > > indeed 
> > > > > > > > > it was not only as slow as typical SYSEX load, it 
> could 
> > > > > > actually 
> > > > > > > take
> > > > > > > > > 
> > > > > > > > > longer.
> > > > > > > > >
> > >
> >
>

Re: [emax] Re: RS422 fun

2008-11-22 by tu@...

Ok, this explains why you are seeing errors in the data coming from the PC but not with data going to the PC. You are running the PC RS422 interfaces 
asynchronously when they need to synchronous with the Emax clock. Your cable also does not have the 500kHz clock from the Emax connected!

When your PC RS422 interface is set to 500k baud with its internal clock the PC RS422 interface can receive the data from the Emax perfectly because 
the data is transmitted in the same format as a standard asynchronous UART transmission. However, the 6850 UART in the Emax is running in x1 
synchronous mode, where it needs one correctly aligned clock pulse for each start, stop and data bit received. As the Emax UART RX clock is fed from 
the same 500kHz clock that appears on its RS422 port, the received data needs to be properly synchronized with that clock edge. 

With your currect interfaces the PC UART will be happily transmitting data in sync with its internal clock but the asynchronous bit transitions will not 
always be in sync with the Emax 500kHz clock. Because of this the Emax will sometimes appear to work correctly but then the clock to data relationship 
will drift and there will be corruption in the received data. 

The best solution for this would be to get another RS422 card that allows operation from an external clock in x1 mode. The 500kHz x1 UART clock is 
transmitted from pin 7 of the Emax RS422 connector and needs to be connected to the PC RS422 external clock input. Note that the CTS/RTS pins on 
serial ports are for hardware handshaking and not normally used as clock inputs. The Mac serial interface uses its HSKi pin as its external clock input 
but how this is implemented in another RS422 may be different.

/Tristan

Saturday, November 22, 2008, 9:03:23 PM, you wrote:

>
About the hardware I have used until now:

Serial ports:
- Meilhaus Redcom USB-COMI RS422 USB port. Also sold with other brand 
names such as Easysync; very popular one. --> This is the one I have 
best results with. Internal clockable at 500kbaud. 
- Moxa Uport 1150 RS422/RS232 USB port. This device does not support 
RTS/CTS handshaking for RS422 and is not internally clockable at 500 
kbaud. So it's useless :-)
- Exsys EX-1362 double RS422 PCMCIA card. This one has the same 
features as the Meilhaus but the results where less reliable.
- Ednet RS232 USB adapter 84204. A cheap RS232 device, just to see if 
this wouldn't work. It didn't. 

Cable/wiring:
Until now I only used the GND and DATA signals, so I connected 5 pins 
of the Emax/Emulator II to the PC RS422 as follows:
- Emax PIN 3 (GND) to RS422 PIN 5 (GND)
- Emax PIN 4 (RXD+) to RS422 PIN 2 (TXD+)
- Emax PIN 5 (RXD-) to RS422 PIN 1 (TXD-)
- Emax PIN 8 (TXD+) to RS422 PIN 3 (RXD+)
- Emax PIN 9 (TXD-) to RS422 PIN 4 (RXD-)
The cable is a 10-wire shielded cable of 1.5 meters long.

(I already spent 300 EUR on serial devices, so I'm not planning to 
buy additional ones anymore :-)

Final note: before I started this project with the EII/Emax, I had 
never programmed/monitored a serial device before, so let's say that 
my hardware/RS422 experience is low but increasing ...

///E-Synthesist

--- In emax@yahoogroups.com, tu@... wrote:
>
> I think the solution here really depends on the actual cause of the 
problem. It may even be just some simple thing like the cable wiring 
or a driver 
> setting for the PC RS422 hardware. It would be helpful if you could 
provide some more detail on the hardware you are using. For a start, 
the exact 
> brand and model number of the RS422 interfaces and cables plus the 
wiring diagrams of the cables.
> 
> The best case would be if you could get an existing PC RS422 
interface to work with the Emax with no hardware modification. 
Otherwise the solutions 
> start to get more complicated, such as modifying circuits, building 
an interface board or even having a microcontroller sitting between 
the PC and the 
> Emax doing protocol translation. But now you have the Emax 
protocols worked out I believe a solution can be achieved. 
> 
> If you don't have the tools to measure what is going on in the 
interface circuits then you will have difficulty sorting this out. I 
would suggest using a 
> digital oscilloscope to measure the TX and RX data signals plus the 
500kHz clock at the Emax 6850 UART chip when the Emax is actually 
communicating 
> with both the Mac and the PC. You will need at least two 
oscilloscope channels to see the clock and the data simultaneously. 
More channels would be 
> nice, but the TX data and clock together and RX data and clock 
together are the first things to look at. You could also use a logic 
analyzer but I think an 
> oscilloscope is better because it will show the actual waveforms, 
not just the logic transitions.
> 
> Unfortunately the Emax and Mac RS422 interfaces are products of 
their times, and times move on. No doubt it was a reasonable decision 
to implement 
> the interface to the host computer this way back in the 1980s.
> 
> The sysex timeout is related to the dumping protocol and has no 
real bearing on what happens with the clocking at the data tranfer 
layer. But you could 
> always experiment with it to see if it makes any difference to the 
problem you are seeing. At this stage we do not know for sure that 
the problem is at 
> the low level.
> 
> I am not sure how much experience you have with hardware and 
communications troubleshooting but I am happy to help or provide 
further if you 
> would like to pursue this. As I said in a previous email, I would 
like to see a general solution that would allow any of the Emu RS422 
equipped samplers 
> to be connected to a modern PC for sample dumping and/or bank 
transfer (where applicable). You have done fabulous work with the 
EMXP program and 
> seem to have the software and Emu formats and protocols worked out. 
So I think getting this happening should not be too hard :)
> 
> /Tristan
> 
> Saturday, November 22, 2008, 12:00:21 AM, you wrote:
> 
> >
> Thanks Tristan.
> 
> I'm wondering though: even if we find the actual cause of the 
problem 
> (timing or signal level), I guess there's not much we can do to 
solve 
> the problem. Besides making a custom communication board of course.
> Because I don't think characteristics such as "clock to data 
> relationship" can be configured on any normal commercial RS422 port 
> device for PCs, right ?
> That's in fact the only reason why I didn't invest in a scope yet: 
> exactly knowing the problem would be nice, but not being able to 
> solve it would be frustrating :-)
> Man ! I would love the standard PC RS422 ports to be externally 
> clockable ! Why is this (once again) one of those "Mac"-only 
> features !
> 
> Question: the RS422 communication "timeout period" on the Emax can 
be 
> configured with a SYSEX command (from 1 to 127 seconds). But I 
guess 
> this is not something that can help on the lowel level data 
> syncronization problem we are dealing with here, right ? I 
> guess "our" problem is more related to the speed at which a stream 
of 
> bits (as a whole) is entering the Emax port ?
> 
> ///E-Synthesist 
> 
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > Yes, an oscilloscope is what you need. I suggest getting a 
digital 
> model as it should allow you to capture and store the signals you 
are 
> measuring. Some 
> > high end multimeters also have oscilloscope functions, but check 
> the bandwidth is well above the highest frequencies you will need 
to 
> measure. An audio 
> > card is not suitable for this task.
> > 
> > I did a search on the Mac serial port and it seems that while the 
> output voltage levels are slightly non standard they should not 
> present any problems for 
> > the Emax 9637 RS422 receiver chip. I only have the Emax II 
> schematics but I believe the RS422 interface should be the same as 
> the Emax. The 9637 
> > circuit doesn't appear to have any EMI supression or termination 
> other than a pullup to +5V on the noninverting input. So the Emax 
is 
> relying on the 
> > sending circuit to ensure a reasonably clean signal arrives. The 
> Mac has an EMI filter on its RS422 port but I am not sure what your 
> PC RS422 port may 
> > have.
> > 
> > Another thing to look at is the relationship between the 500kHz 
> clock the Emax sends out and the data that is sent back to the Emax 
> from the PC. The 
> > 6850 UART in the Emax relies on a this being within a certain 
> timing range. If the clock to data relationship from the PC RS422 
> port is not the same as 
> > from the Mac then this could cause problems. The same would also 
> occur if the PC RS422 transmit clock is drifting because is not 
> locked to the same 
> > clock that it is receiving from the Emax. Of course the data 
being 
> sent from the Emax to the PC will be ok because the clock and data 
> are transmitted 
> > together with the correct timing relationship.
> > 
> > /Tristan
> > 
> > Tuesday, November 18, 2008, 3:58:48 AM, you wrote:
> > 
> > >
> > To have 100% certainty about the actual problem I should indeed 
do 
> > some measurements with an oscilloscope... but I don't have one.
> > I was (and still) am thinking about buying one, either analog or 
> > digital. Until now I only did some measurements with an external 
> > audio card acting as a wave recorder, but its sampling frequency 
> and 
> > bandwith are - of course - insufficient to do proper measurements 
> on 
> > 500kbaud signals. What I do see however - even with this method - 
> is 
> > that the amplitude level of the Mac signal is much higher than 
the 
> PC 
> > signal.
> > On the other hand, if the RS422 of the Emax is standard, then I 
> > shouldn't have any problem. Mmmm... 
> > Yes, the best solution would consist of a custom RS422 port for 
the 
> > PC which can even be externally clocked. But I'm not an 
electronics 
> > specialist so it will take a looooonnnnng time before I will end 
up 
> > with a working set :-)
> > 
> > ///E-Synthesist
> > 
> > --- In emax@yahoogroups.com, tu@ wrote:
> > >
> > > I am not sure about the Mac circuitry but the RS422 interface 
on 
> > the Emax should just be standard 
> > > 9637 and 9638 RS422 buffers. The input threshold on the 9637 
> > receiver is specified to be +/- 
> > > 200mV so it should work with voltages higher than that. Do you 
> have 
> > an oscilloscope that you can 
> > > use to probe the 9637 while it is receiving data? If so, you 
> could 
> > compare when receiving data 
> > > from the Mac and the PC via RS422.
> > > 
> > > Its not a priority, but I think it would be worthwhile to have 
an 
> > RS422 interface that would allow 
> > > any PC to be used for sample dumping to the Emax I, Emax II, 
EII, 
> > EIII and EIIIx as well as bank 
> > > transfer with the EII and Emax. Even if an interface box cost 
> some 
> > money I feel there would be a 
> > > demand given the numbers of these samplers still in use. The 
Emu 
> > world cannot live on old Macs 
> > > alone :)
> > > 
> > > /Tristan
> > > 
> > > Monday, November 17, 2008, 3:24:57 AM, you wrote:
> > > 
> > > >
> > > After some additional testing I'm pretty sure the problems are 
> not 
> > > caused by timing differences, but by voltage levels. 
> > > I received a PCMCIA RS422 port this week, and this thing has 
even 
> > > more problems with communicating with the EII and the Emax than 
> my 
> > > USB/RS422 converter device. And again the communication problem 
> is 
> > to 
> > > be found in the PC->Emax transmit part, not in the receive part.
> > > I mentioned before that the Mac RS422 is sending very high 
signal 
> > > levels (higher than "officially" allowed by the RS422 
standard). 
> > The 
> > > Emu samplers seem to rely on these high signals.
> > > Conclusion: I give up the current experiments. Perhaps some 
time 
> in 
> > > the future I'll try to make a device based on Mac circuits...
> > > 
> > > --- In emax@yahoogroups.com, tu@ wrote:
> > > >
> > > > Ok, that is interesting.
> > > > 
> > > > An alternative to direct connection of the RS422 to the PC 
> would 
> > be 
> > > a microcontroller sitting 
> > > > between the PC and sampler. I think someone suggested that 
> > before. 
> > > It could respond to the 
> > > > sampler with tight timing but handle the loose timing over 
the 
> PC 
> > > connection. I guess the PC side 
> > > > could be implemented with either RS-232 or USB. But obviously 
> USB 
> > > would require a lot more 
> > > > coding than simply translating RS422 and RS232 port protocols 
> > with 
> > > a bit of buffering in between.
> > > > 
> > > > /Tristan
> > > > 
> > > > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
> > > > 
> > > > >
> > > > Yes it's about the same concept as on the EII: taking an 
exact 
> > dump 
> > > > of the internal Emax memory at 500 kbaud in both directions. 
Or 
> > in 
> > > > other words... transferring an EMX file across the serial 
line 
> > > > (except for the EMX 39 byte header string of course).
> > > > 
> > > > But there are two major drawbacks compared with the EII: 
> > > > 1/ the Emax uses the MMA standard to accomplish this dump, 
> > meaning 
> > > > that the data is sent in packets of 120 bytes instead of 256 
> > bytes, 
> > > > which is slower.
> > > > 2/ it's not possible to dump specific memory segments, the 
> whole 
> > > > thing must be dumped in one sequential loop from the very 
> > beginning 
> > > > (position 0) to the very end (position 552959). 
> > > > 
> > > > The second one is a BIG problem: it means that if something 
> goes 
> > > > wrong (like a bad packet) the whole dump must be restarted.
> > > > And... since the PC RS422 communication line with the Emax is 
> not 
> > > > optimal, this kind of error will for sure occur during a bank 
> > > > transfer. On the EII, this means simply re-asking for the 
> > > particular 
> > > > bad data packet, but on the Emax you have to start all over 
> again.
> > > > 
> > > > In practice this means that a full load/unload is simply not 
> > > possible 
> > > > with my current hardware (USB-RS422 and USB-RS232 converters 
of 
> > all 
> > > > kinds) because the loop is restarted endlessly. At the end of 
> the 
> > > > week I'll try an non-USB port device, I hope that one will 
work.
> > > > If not, a custom RS422 PC port must be built for the 
Emax/EII, 
> > > based 
> > > > on the RS422 circuits & ICs of the Mac.
> > > > 
> > > > ///E-Synthesist
> > > > 
> > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > >
> > > > > Fantastic! So, is it the same method that the EII uses for 
> bank 
> > > > transfer or something else? Is there 
> > > > > any chance you could document the protocol? 
> > > > > 
> > > > > I think 25-30 seconds should be acceptable for Emax I bank 
> > loads. 
> > > > At least it provides an option 
> > > > > for those who can't or don't want to add SCSI. 
> > > > > 
> > > > > The Emax II load time does sound a bit slow. But it might 
> still 
> > > be 
> > > > of use if someone had a working 
> > > > > Emax II with a dead SCSI chip.
> > > > > 
> > > > > Out of interest, can the Emax II directly load an Emax I 
bank 
> > > (with 
> > > > compressed 8 bit samples) in 
> > > > > this way? 
> > > > > 
> > > > > /Tristan
> > > > > 
> > > > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
> > > > > 
> > > > > >
> > > > > After some experiments during the weekend, the current 
status 
> > of 
> > > my 
> > > > > little RS422 project is that I know how to do *fast* bank 
> > > > > loads/unloads on the Emax via RS422. 
> > > > > This should reduce the total data transfer time to 25-30 
> > seconds 
> > > on 
> > > > > the Emax-I instead of the 2-3 minutes of Alchemy. Most 
> probably 
> > > > this 
> > > > > was also the total load time of the OMI CDS3 system, which 
> is - 
> > > > let's 
> > > > > say - "acceptable"... 
> > > > > That's about the same speed as loading from a floppy :-) 
but 
> > the 
> > > > > biggest advantage would be that one would have immediate 
> access 
> > > to 
> > > > > hundreds of banks on the PC harddrive instead of having to 
> copy 
> > > > > individual banks to floppy disks first... 
> > > > > Still SCSI is a much better alternative... for those having 
a 
> > > rev2 
> > > > or 
> > > > > rev3 board, and for those using the Emax-II. BTW at RS422 
> > speed, 
> > > > the 
> > > > > data transfer time on a fully loaded Emax-II Turbo 8M would 
> be 
> > > > about 
> > > > > 7 minutes :-). Fortunately every Emax-II is equipped with 
> SCSI.
> > > > > 
> > > > > I have to write some decent software now which supports the 
> > full 
> > > > Emax 
> > > > > handshaking protocol. But I'm pretty sure that the USB<--
> >RS422 
> > > > > converters will not be the best solution for this 
> > communication - 
> > > > > just like with the EII the communication seems to be quite 
> > > > unreliable 
> > > > > when transmitting data from the PC to the Emax, as a 
> > consequence 
> > > > the 
> > > > > total transfer time increases dramatically due to 
handshaking 
> > > > > overhead. 
> > > > > At the end of the week I will have a PCCard RS422 port on 
my 
> > > > laptop. 
> > > > > This piece of hardware does not suffer from USB latency, so 
I 
> > > hope 
> > > > it 
> > > > > will work better...
> > > > > 
> > > > > ///E-Synthesist
> > > > > 
> > > > > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@> 
> wrote:
> > > > > >
> > > > > > Yes, I was also thinking there must be some dedicated 
> command 
> > > > (set) 
> > > > > > for fast load/unload. But the fact that John remembered a 
> > load 
> > > > time 
> > > > > > of 5 minutes for the OMI cdroms made me doubt again... On 
> the 
> > > > other 
> > > > > > hand it is true that OMI cdroms could only be used after 
> the 
> > > > > release 
> > > > > > of OS 3.2, so this is indeed an indication that 
additional 
> > > > commands 
> > > > > > have been added, or at least some changes have been 
> applied. 
> > I 
> > > > also 
> > > > > > observed that the v 3.2 MIDI protocol is not 100% 
behaving 
> as 
> > > > > > described in the v 3.0 document, e.g. the timeout 
handling 
> is 
> > > > > > different. So there are also changes in the 'normal' 
> > SYSEX/MMA 
> > > > > > protocol.
> > > > > > By the way: the OMI drive also required a firmware update 
> in 
> > > > order 
> > > > > to 
> > > > > > be compatible with the Emax. Question is of course 
whether 
> > this 
> > > > was 
> > > > > > just a small firmware update (to support the newly added 
> > > commands 
> > > > > in 
> > > > > > the Emax OS) or a huge piece of Emax-specific code (to 
> > > implement 
> > > > > the 
> > > > > > full SYSEX/MMA command set - which is indeed quite 
> > unlikely) ...
> > > > > > 
> > > > > > The Emax-II and EIII indeed have a filesystem which is 
> > > optimized 
> > > > > for 
> > > > > > handling different banksizes; I have the specs here 
because 
> I 
> > > > > needed 
> > > > > > them for EMXP. The EII and Emax are using filesystems 
with 
> > > fixed 
> > > > > > filesizes in a sequential order.
> > > > > > 
> > > > > > Since I don't have any Emax OMI cdrom disk I'm not even 
> sure 
> > > > > whether 
> > > > > > the banks on these disks are "EMX-like" 8-bit images or 
> > > expanded 
> > > > 12 
> > > > > > bit images. It makes sense that they are 8-bit, because 
> this 
> > > > > allowed 
> > > > > > OMI to put more banks on a CD, to transfer them faster to 
> the 
> > > > Emax 
> > > > > > (if EII-like commands have been implemented in the Emax 
OS 
> of 
> > > > > course) 
> > > > > > and to use the same bank layout as on the Emax floppy and 
> > Emax 
> > > > > > harddisk banks.
> > > > > > 
> > > > > > So despite the "5 minutes load time" note from John, I 
> think 
> > we 
> > > > can 
> > > > > > still assume that there is some specific command set in 
> V3.2 
> > > > which 
> > > > > > enables fast bank loads. I will try to find them out 
during 
> > the 
> > > > > > weekend, either by experimenting or by looking into the 
OS 
> > > > > > binary/disassembled code...
> > > > > > 
> > > > > > ///E-Synthesist
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > > >
> > > > > > > 
> > > > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
> > > > > > > 
> > > > > > > >
> > > > > > > But the 5 minutes load time may have been reality...
> > > > > > > 
> > > > > > > This can explain why I don't know anyone and find no 
> > > reference 
> > > > at 
> > > > > > all 
> > > > > > > of anyone who actually used this CD-ROM drive with the 
> > Emax. 
> > > If 
> > > > > > this 
> > > > > > > 5 minutes load time is true, this must have resulted in 
a 
> > > > > > commercial 
> > > > > > > failure for OMI when they launched the Emax OMI cd 
> disks... 
> > > but 
> > > > > > they 
> > > > > > > probably released these disks also in Mac/SD format ?
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Yes, such a slow load time would have been a major 
> > marketing 
> > > > > > problem. I find it difficult to imagine that Emu would 
not 
> > have 
> > > > > added 
> > > > > > the small amount of 
> > > > > > > extra code required to load in a bank quickly via 
RS422. 
> If 
> > > > they 
> > > > > > wanted to sell Emaxes then surely there was a strong 
> > incentive 
> > > to 
> > > > > > make the sound 
> > > > > > > library efficient to use. I suspect the OMI CDROM 
system 
> > for 
> > > > the 
> > > > > > Emax was not a major market success because of the cost. 
> The 
> > > OMI 
> > > > > > CDROM drive, or 
> > > > > > > even a Mac with a CDROM drive, would have cost a 
> > significant 
> > > > > > proportion of the cost of an Emax. The average musician 
> > > probably 
> > > > > > would not have been 
> > > > > > > able to justify that additional expense. Particularly 
so 
> > > given 
> > > > > that 
> > > > > > early CDROM drives were rather fragile.
> > > > > > > 
> > > > > > > >
> > > > > > > 
> > > > > > > And yes, Emu has done strange things. E.g. the EII 
cdrom 
> > kit 
> > > > > > > supported a "folder" or "category" system: the banks on 
a 
> > > disk 
> > > > > > could 
> > > > > > > be put in folders (like bank "piano" in 
folder "acoustic 
> > > > > > keyboards") 
> > > > > > > to make navigation much easier. This feature was not 
> > > available 
> > > > on 
> > > > > > the 
> > > > > > > Emax and EIII harddisks. Maybe Emu considered this to 
be 
> a 
> > > > > feature 
> > > > > > of 
> > > > > > > OMI and not of Emu themselves, but they could have 
> learned 
> > > from 
> > > > > > > that...
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Surely the category organisation was only a feature of 
> the 
> > > OMI 
> > > > > > CDROM system, as the EII had no control over it. So it 
was 
> > > OMI's 
> > > > > > CDROM format, not 
> > > > > > > Emu's format. But this also gave OMI the flexibility to 
> put 
> > > as 
> > > > > many 
> > > > > > banks on the disk as they wanted and to organise them as 
> they 
> > > > > wanted. 
> > > > > > There was 
> > > > > > > no restriction on how OMI could do this as long as they 
> > could 
> > > > > serve 
> > > > > > up the full memory image of each bank to the EII via the 
> > RS422 
> > > > port 
> > > > > > when required.
> > > > > > > 
> > > > > > > Don't the Emax and the EII hard disk formats allocate a 
> > fixed 
> > > > > > number of banks for the disk? I believe you cannot fit 
any 
> > more 
> > > > > banks 
> > > > > > on the disk even if 
> > > > > > > the existing banks are only half full of samples. 
> > Presumably 
> > > > this 
> > > > > > is because the Emax and EII use a fixed memory size for 
> each 
> > > bank 
> > > > > and 
> > > > > > the complete 
> > > > > > > data for the bank is copied directly between memory and 
> > disk 
> > > > when 
> > > > > > you load or save a bank. Each hard disk bank is a the 
> > > equivalent 
> > > > of 
> > > > > > one floppy disk 
> > > > > > > image minus the OS data. I believe the Emax II and EIII 
> use 
> > > > > > variable sized banks. Therefore the number of banks 
stored 
> on 
> > a 
> > > > > hard 
> > > > > > disk or CDROM 
> > > > > > > depends on how much data is contained in each bank. But 
I 
> > > > believe 
> > > > > > there is still a limit of 100 banks per disk. 
> > > > > > > 
> > > > > > > >
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > RS422 Communication with the Emulator was designed 
based 
> on 
> > > > > > following 
> > > > > > > key principles:
> > > > > > > - all communication, including request/reply for 
> parameter 
> > > > > changes, 
> > > > > > > occurs at 500 Kbaud
> > > > > > > - a whole bank can be downloaded/loaded with one 
special 
> > > > designed 
> > > > > > > type of command (a command which actually directly 
> > > reads/writes 
> > > > > the 
> > > > > > > RAM memory segments in which the bank data is residing)
> > > > > > > - bulk data load/unload occurs with data packets sized 
> 256 
> > > > bytes, 
> > > > > > of 
> > > > > > > which each byte represents 1 sample point (data is 
> > > transferred 
> > > > in 
> > > > > > > compressed format)
> > > > > > > 
> > > > > > > On the Emax, they seem to have decided that choosing 
for 
> a 
> > > > > > *standard* 
> > > > > > > medium speed protocol was more important than choosing 
> for 
> > a 
> > > > > > > *proprietary* high speed protocol. So they went for the 
> > MIDI 
> > > > > > > SYSES/MMA approach:
> > > > > > > - all basic communication, including all 
> > > commands/instructions, 
> > > > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI 
sockets 
> > or 
> > > > the 
> > > > > > DB9 
> > > > > > > RS422 port are being used.
> > > > > > > - loading/unloading banks requires the full set of 
SYSEX 
> > > > > commands. 
> > > > > > > Hence to simply download the parameters of just one 
voice 
> > of 
> > > > just 
> > > > > > one 
> > > > > > > preset, already multiple commands must be exchanged 
with 
> > the 
> > > > > Emax. 
> > > > > > > This is due to the fact that in general only one 
> parameter 
> > > can 
> > > > be 
> > > > > > > transferred per command. And this must be done at the 
> slow 
> > > > 31.25 
> > > > > > > Kbaud speed...mmmm...
> > > > > > > - bulk data (sample) load/unload occurs with data 
packets 
> > > sized 
> > > > > > only 
> > > > > > > 120 bytes (MMA standard). Moreover each sample point 
> > requires 
> > > > 12 
> > > > > > bits 
> > > > > > > now instead of 8 bits on the EII since data is 
> transferred 
> > in 
> > > > > > linear 
> > > > > > > format instead of compressed format.
> > > > > > > As a consequence, loading/unloading banks is much 
slower 
> > than 
> > > > on 
> > > > > > the 
> > > > > > > EII. Of course, once they released the Emax-II, they 
> would 
> > > have 
> > > > > > faced 
> > > > > > > problems anyway. This machine could have up to 8MB 
banks 
> > and 
> > > > > > doesn't 
> > > > > > > use compression, so even at full 500 kbaud speed and 
> using 
> > > only 
> > > > > one 
> > > > > > > command - which is impossible in reality - the Emax-II 
> > would 
> > > > > > require 
> > > > > > > at least 2.7 minutes for loading/unloading banks. 
> > Fortunately 
> > > > > there 
> > > > > > > was something invented called SCSI :-)
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Have a look at the MIDI spec for the Emax V3.0 
software. 
> > The 
> > > > fast 
> > > > > > (RS422) dumps use a protocol based on the MIDI SDS but 
> > slightly 
> > > > > > modified. The 
> > > > > > > sample data is dumped as 12 bit linear but the samples 
> are 
> > > > packed 
> > > > > > so that two 12 bit samples are transferred in three 8 bit 
> > > bytes. 
> > > > It 
> > > > > > is also of note that 
> > > > > > > sending 8 bit wide data in this way violates the MIDI 
> > > standard, 
> > > > > as 
> > > > > > bit7 is always reserved as an indicator of a status byte. 
> Of 
> > > > course 
> > > > > > this is not really an 
> > > > > > > issue here as the 500k baud RS422 data is only being 
> > > > transferred 
> > > > > > to/from the Emax so no other MIDI devices will ever see 
> this 
> > > > > > violation of the 
> > > > > > > standard. But the outcome is that dumping samples as 12 
> bit 
> > > > only 
> > > > > > takes 50% longer than dumping as 8 bit compressed. Doing 
a 
> > > proper 
> > > > > > MIDI SDS dump 
> > > > > > > of 8 bit or 12 bit data actually takes the same amount 
of 
> > > time 
> > > > as 
> > > > > > only 7 data bits can be transferred for each byte in the 
> > > message. 
> > > > > So 
> > > > > > an 8 bit dump 
> > > > > > > takes two bytes per sample (7 + 1) while a 12 bit dump 
> also 
> > > > > > requires two bytes per sample (7 + 5). 16 bit dumps are 
> even 
> > > > slower 
> > > > > > as they require three 
> > > > > > > bytes per sample (7 + 7 + 2).
> > > > > > > 
> > > > > > > As you have said, the failure to provide a means of 
> > directly 
> > > > > > transferring banks into memory via RS422 seems to be the 
> > > problem 
> > > > in 
> > > > > > the Emax, at least as 
> > > > > > > documented in the V3.0 MIDI spec. But if the V3.0 spec 
> > > already 
> > > > > > provides all the functions required to load banks from 
the 
> > > CDROM 
> > > > > > drive using MIDI 
> > > > > > > SYSEX and RS422, then why is V3.2 or the SE software 
> > claimed 
> > > to 
> > > > > add 
> > > > > > OMI CDROM support? It still seems likely to me that some 
> > extra 
> > > > > > functions were 
> > > > > > > added in those versions to support fast bank loading 
via 
> > > RS422. 
> > > > > If 
> > > > > > not, then the OMI CDROM drive would have to be converting 
> the 
> > 8 
> > > > bit 
> > > > > > compressed 
> > > > > > > sample data on the CDROM to 12 bit linear in order to 
> dump 
> > > the 
> > > > > > samples into the Emax. The Emax would then have to 
convert 
> > the 
> > > 12 
> > > > > bit 
> > > > > > linear samples 
> > > > > > > back to compressed 8 bit samples. The transfer of 
samples 
> > > would 
> > > > > > also take 50% longer for 12 bit linear compared to 8 bit 
> > > > > compressed. 
> > > > > > And of course 
> > > > > > > there would be no way for sequencer data included in 
the 
> > bank 
> > > > to 
> > > > > be 
> > > > > > loaded into the Emax. I could be wrong, but it just seems 
> > > > unlikely 
> > > > > > Emu would have 
> > > > > > > made it so difficult when a small software update to 
the 
> > Emax 
> > > > > could 
> > > > > > make bank dumping work in much the same way as the EII.
> > > > > > > 
> > > > > > > >
> > > > > > > 
> > > > > > > Nevertheless I will still do some experiments to find 
out 
> > if 
> > > > the 
> > > > > > Emax 
> > > > > > > OS doesn't have any "fast bank load" commands... 
> > > > > > > By the way: does anyone know whether the binary code of 
> the 
> > > > Emax 
> > > > > OS 
> > > > > > > can easily be de-compiled/disassembled in some way in 
> order 
> > > to 
> > > > > get 
> > > > > > > some kind of source code ? Is a simple Z80 disassembler 
> > > > > sufficient ?
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Unfortunately it seems the only way is to experiment 
and 
> > see 
> > > > what 
> > > > > > can be uncovered. The Emax NS32000 main CPU code can be 
> > > > > disassembled 
> > > > > > but it is 
> > > > > > > not a common processor. The hard part of analyzing the 
> > > > > disassembled 
> > > > > > code is working out where the program and data begins and 
> > ends 
> > > as 
> > > > > > well as what 
> > > > > > > interrupt routines are being handled at runtime and how 
> > they 
> > > > > > interact. You would need to combine together the code 
from 
> > the 
> > > > disk 
> > > > > > OS image and the 
> > > > > > > EPROM into a processor memory map. Various hardware 
> > > peripherals 
> > > > > > will also probably exist at certain addresses in the 
memory 
> > > map. 
> > > > To 
> > > > > > pull it all 
> > > > > > > together you will ideally have the circuit schematics, 
> the 
> > > > memory 
> > > > > > map, CPU/chip documentation plus a detailed design 
> > description 
> > > of 
> > > > > how 
> > > > > > the system 
> > > > > > > works. Often much of this data can be found in the 
> product 
> > > > > service 
> > > > > > manual. Then you need to determine which routines are 
> called 
> > > when 
> > > > > > MIDI/RS422 
> > > > > > > interrupts are handled. Testing with a logic analyzer 
> > probing 
> > > > the 
> > > > > > CPU would certainly make that easier.
> > > > > > > 
> > > > > > > /Tristan
> > > > > > > 
> > > > > > > >
> > > > > > > 
> > > > > > > 
> > > > > > > ///E-Synthesist 
> > > > > > > 
> > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > > > >
> > > > > > > > That seems excessively slow, as the EII could load a 
> > > similar 
> > > > > > sized 
> > > > > > > bank from the same CDROM 
> > > > > > > > drive in 12 seconds. Its hard to imagine Emu would 
not 
> > have 
> > > > > > > implemented a similar load time on 
> > > > > > > > the Emax if all it took was adding a software 
routine. 
Show quoted textHide quoted text
> > But 
> > > > then 
> > > > > > > again, stranger things have 
> > > > > > > > happened...
> > > > > > > > 
> > > > > > > > /Tristan
> > > > > > > > 
> > > > > > > > Quoting John Silveria II <john@>:
> > > > > > > > 
> > > > > > > > > Somewhere, and I can't remember where, I read that 
> the 
> > CD-
> > > > Rom 
> > > > > > > drive
> > > > > > > > > took 
> > > > > > > > > up to 5 minutes to load a bank. I wish I could 
> remember 
> > > > > where. 
> > > > > > So
> > > > > > > > > indeed 
> > > > > > > > > it was not only as slow as typical SYSEX load, it 
> could 
> > > > > > actually 
> > > > > > > take
> > > > > > > > > 
> > > > > > > > > longer.
> > > > > > > > >
> > >
> >
>

Re: [emax] Re: RS422 fun

2008-11-22 by Ted Summers

This may be butting in, but.....

According to the Emax Service manual, Pin 7 on the Emax DB-9 is the  
clock.
On the Emax cable used with Alchemy (which I have built from Emulator  
Archive pinout and used to transfer to/from Emax 1 with Alchemy) the  
clock signal is connected......

 From some notes I see for RS422 differential, in some cases there  
should be a termination 100 or 120 ohm resistor between the receive +  
- pair on one end of the circuit.

Perhaps the Mac has this built-in on their circuit and that is why it  
works, but the typical PC interface card does not? (ie they expect you  
to build it into the cable).

I know the RS-422 MICROS POS UWS 2 and 3 terminals that I used to  
install had a resistor supplied with every terminal. I am not sure  
whether those were RS422 differential, though.....

You could try the 100 ohm resistor and connect the clock.
Loading the line down will only do one of two things I can think of:
1) the signal is too loaded and doesn't work
2) Resolve a "reference to ground" state and fixes the problem.

Just a thought.


Regards,
Ted


On Nov 22, 2008, at 5:03 AM, esynthesist wrote:

About the hardware I have used until now:

Serial ports:
- Meilhaus Redcom USB-COMI RS422 USB port. Also sold with other brand
names such as Easysync; very popular one. --> This is the one I have
best results with. Internal clockable at 500kbaud.
- Moxa Uport 1150 RS422/RS232 USB port. This device does not support
RTS/CTS handshaking for RS422 and is not internally clockable at 500
kbaud. So it's useless :-)
- Exsys EX-1362 double RS422 PCMCIA card. This one has the same
features as the Meilhaus but the results where less reliable.
- Ednet RS232 USB adapter 84204. A cheap RS232 device, just to see if
this wouldn't work. It didn't.

Cable/wiring:
Until now I only used the GND and DATA signals, so I connected 5 pins
of the Emax/Emulator II to the PC RS422 as follows:
- Emax PIN 3 (GND) to RS422 PIN 5 (GND)
- Emax PIN 4 (RXD+) to RS422 PIN 2 (TXD+)
- Emax PIN 5 (RXD-) to RS422 PIN 1 (TXD-)
- Emax PIN 8 (TXD+) to RS422 PIN 3 (RXD+)
- Emax PIN 9 (TXD-) to RS422 PIN 4 (RXD-)
The cable is a 10-wire shielded cable of 1.5 meters long.

(I already spent 300 EUR on serial devices, so I'm not planning to
buy additional ones anymore :-)

Final note: before I started this project with the EII/Emax, I had
never programmed/monitored a serial device before, so let's say that
my hardware/RS422 experience is low but increasing ...

///E-Synthesist

--- In emax@yahoogroups.com, tu@... wrote:
 >
 > I think the solution here really depends on the actual cause of the
problem. It may even be just some simple thing like the cable wiring
or a driver
 > setting for the PC RS422 hardware. It would be helpful if you could
provide some more detail on the hardware you are using. For a start,
the exact
 > brand and model number of the RS422 interfaces and cables plus the
wiring diagrams of the cables.
 >
 > The best case would be if you could get an existing PC RS422
interface to work with the Emax with no hardware modification.
Otherwise the solutions
 > start to get more complicated, such as modifying circuits, building
an interface board or even having a microcontroller sitting between
the PC and the
 > Emax doing protocol translation. But now you have the Emax
protocols worked out I believe a solution can be achieved.
 >
 > If you don't have the tools to measure what is going on in the
interface circuits then you will have difficulty sorting this out. I
would suggest using a
 > digital oscilloscope to measure the TX and RX data signals plus the
500kHz clock at the Emax 6850 UART chip when the Emax is actually
communicating
 > with both the Mac and the PC. You will need at least two
oscilloscope channels to see the clock and the data simultaneously.
More channels would be
 > nice, but the TX data and clock together and RX data and clock
together are the first things to look at. You could also use a logic
analyzer but I think an
 > oscilloscope is better because it will show the actual waveforms,
not just the logic transitions.
 >
 > Unfortunately the Emax and Mac RS422 interfaces are products of
their times, and times move on. No doubt it was a reasonable decision
to implement
 > the interface to the host computer this way back in the 1980s.
 >
 > The sysex timeout is related to the dumping protocol and has no
real bearing on what happens with the clocking at the data tranfer
layer. But you could
 > always experiment with it to see if it makes any difference to the
problem you are seeing. At this stage we do not know for sure that
the problem is at
 > the low level.
 >
 > I am not sure how much experience you have with hardware and
communications troubleshooting but I am happy to help or provide
further if you
 > would like to pursue this. As I said in a previous email, I would
like to see a general solution that would allow any of the Emu RS422
equipped samplers
 > to be connected to a modern PC for sample dumping and/or bank
transfer (where applicable). You have done fabulous work with the
EMXP program and
 > seem to have the software and Emu formats and protocols worked out.
So I think getting this happening should not be too hard :)
 >
 > /Tristan
 >
 > Saturday, November 22, 2008, 12:00:21 AM, you wrote:
 >
 > >
 > Thanks Tristan.
 >
 > I'm wondering though: even if we find the actual cause of the
problem
 > (timing or signal level), I guess there's not much we can do to
solve
 > the problem. Besides making a custom communication board of course.
 > Because I don't think characteristics such as "clock to data
 > relationship" can be configured on any normal commercial RS422 port
 > device for PCs, right ?
 > That's in fact the only reason why I didn't invest in a scope yet:
 > exactly knowing the problem would be nice, but not being able to
 > solve it would be frustrating :-)
 > Man ! I would love the standard PC RS422 ports to be externally
 > clockable ! Why is this (once again) one of those "Mac"-only
 > features !
 >
 > Question: the RS422 communication "timeout period" on the Emax can
be
 > configured with a SYSEX command (from 1 to 127 seconds). But I
guess
 > this is not something that can help on the lowel level data
 > syncronization problem we are dealing with here, right ? I
 > guess "our" problem is more related to the speed at which a stream
of
 > bits (as a whole) is entering the Emax port ?
 >
 > ///E-Synthesist
 >
 > --- In emax@yahoogroups.com, tu@ wrote:
 > >
 > > Yes, an oscilloscope is what you need. I suggest getting a
digital
 > model as it should allow you to capture and store the signals you
are
 > measuring. Some
 > > high end multimeters also have oscilloscope functions, but check
 > the bandwidth is well above the highest frequencies you will need
to
 > measure. An audio
 > > card is not suitable for this task.
 > >
 > > I did a search on the Mac serial port and it seems that while the
 > output voltage levels are slightly non standard they should not
 > present any problems for
 > > the Emax 9637 RS422 receiver chip. I only have the Emax II
 > schematics but I believe the RS422 interface should be the same as
 > the Emax. The 9637
 > > circuit doesn't appear to have any EMI supression or termination
 > other than a pullup to +5V on the noninverting input. So the Emax
is
 > relying on the
 > > sending circuit to ensure a reasonably clean signal arrives. The
 > Mac has an EMI filter on its RS422 port but I am not sure what your
 > PC RS422 port may
 > > have.
 > >
 > > Another thing to look at is the relationship between the 500kHz
 > clock the Emax sends out and the data that is sent back to the Emax
 > from the PC. The
 > > 6850 UART in the Emax relies on a this being within a certain
 > timing range. If the clock to data relationship from the PC RS422
 > port is not the same as
 > > from the Mac then this could cause problems. The same would also
 > occur if the PC RS422 transmit clock is drifting because is not
 > locked to the same
 > > clock that it is receiving from the Emax. Of course the data
being
 > sent from the Emax to the PC will be ok because the clock and data
 > are transmitted
 > > together with the correct timing relationship.
 > >
 > > /Tristan
 > >
 > > Tuesday, November 18, 2008, 3:58:48 AM, you wrote:
 > >
 > > >
 > > To have 100% certainty about the actual problem I should indeed
do
 > > some measurements with an oscilloscope... but I don't have one.
 > > I was (and still) am thinking about buying one, either analog or
 > > digital. Until now I only did some measurements with an external
 > > audio card acting as a wave recorder, but its sampling frequency
 > and
 > > bandwith are - of course - insufficient to do proper measurements
 > on
 > > 500kbaud signals. What I do see however - even with this method -
 > is
 > > that the amplitude level of the Mac signal is much higher than
the
 > PC
 > > signal.
 > > On the other hand, if the RS422 of the Emax is standard, then I
 > > shouldn't have any problem. Mmmm...
 > > Yes, the best solution would consist of a custom RS422 port for
the
 > > PC which can even be externally clocked. But I'm not an
electronics
 > > specialist so it will take a looooonnnnng time before I will end
up
 > > with a working set :-)
 > >
 > > ///E-Synthesist
 > >
 > > --- In emax@yahoogroups.com, tu@ wrote:
 > > >
 > > > I am not sure about the Mac circuitry but the RS422 interface
on
 > > the Emax should just be standard
 > > > 9637 and 9638 RS422 buffers. The input threshold on the 9637
 > > receiver is specified to be +/-
 > > > 200mV so it should work with voltages higher than that. Do you
 > have
 > > an oscilloscope that you can
 > > > use to probe the 9637 while it is receiving data? If so, you
 > could
 > > compare when receiving data
 > > > from the Mac and the PC via RS422.
 > > >
 > > > Its not a priority, but I think it would be worthwhile to have
an
 > > RS422 interface that would allow
 > > > any PC to be used for sample dumping to the Emax I, Emax II,
EII,
 > > EIII and EIIIx as well as bank
 > > > transfer with the EII and Emax. Even if an interface box cost
 > some
 > > money I feel there would be a
 > > > demand given the numbers of these samplers still in use. The
Emu
 > > world cannot live on old Macs
 > > > alone :)
 > > >
 > > > /Tristan
 > > >
 > > > Monday, November 17, 2008, 3:24:57 AM, you wrote:
 > > >
 > > > >
 > > > After some additional testing I'm pretty sure the problems are
 > not
 > > > caused by timing differences, but by voltage levels.
 > > > I received a PCMCIA RS422 port this week, and this thing has
even
 > > > more problems with communicating with the EII and the Emax than
 > my
 > > > USB/RS422 converter device. And again the communication problem
 > is
 > > to
 > > > be found in the PC->Emax transmit part, not in the receive part.
 > > > I mentioned before that the Mac RS422 is sending very high
signal
 > > > levels (higher than "officially" allowed by the RS422
standard).
 > > The
 > > > Emu samplers seem to rely on these high signals.
 > > > Conclusion: I give up the current experiments. Perhaps some
time
 > in
 > > > the future I'll try to make a device based on Mac circuits...
 > > >
 > > > --- In emax@yahoogroups.com, tu@ wrote:
 > > > >
 > > > > Ok, that is interesting.
 > > > >
 > > > > An alternative to direct connection of the RS422 to the PC
 > would
 > > be
 > > > a microcontroller sitting
 > > > > between the PC and sampler. I think someone suggested that
 > > before.
 > > > It could respond to the
 > > > > sampler with tight timing but handle the loose timing over
the
 > PC
 > > > connection. I guess the PC side
 > > > > could be implemented with either RS-232 or USB. But obviously
 > USB
 > > > would require a lot more
 > > > > coding than simply translating RS422 and RS232 port protocols
 > > with
 > > > a bit of buffering in between.
 > > > >
 > > > > /Tristan
 > > > >
 > > > > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
 > > > >
 > > > > >
 > > > > Yes it's about the same concept as on the EII: taking an
exact
 > > dump
 > > > > of the internal Emax memory at 500 kbaud in both directions.
Or
 > > in
 > > > > other words... transferring an EMX file across the serial
line
 > > > > (except for the EMX 39 byte header string of course).
 > > > >
 > > > > But there are two major drawbacks compared with the EII:
 > > > > 1/ the Emax uses the MMA standard to accomplish this dump,
 > > meaning
 > > > > that the data is sent in packets of 120 bytes instead of 256
 > > bytes,
 > > > > which is slower.
 > > > > 2/ it's not possible to dump specific memory segments, the
 > whole
 > > > > thing must be dumped in one sequential loop from the very
 > > beginning
 > > > > (position 0) to the very end (position 552959).
 > > > >
 > > > > The second one is a BIG problem: it means that if something
 > goes
 > > > > wrong (like a bad packet) the whole dump must be restarted.
 > > > > And... since the PC RS422 communication line with the Emax is
 > not
 > > > > optimal, this kind of error will for sure occur during a bank
 > > > > transfer. On the EII, this means simply re-asking for the
 > > > particular
 > > > > bad data packet, but on the Emax you have to start all over
 > again.
 > > > >
 > > > > In practice this means that a full load/unload is simply not
 > > > possible
 > > > > with my current hardware (USB-RS422 and USB-RS232 converters
of
 > > all
 > > > > kinds) because the loop is restarted endlessly. At the end of
 > the
 > > > > week I'll try an non-USB port device, I hope that one will
work.
 > > > > If not, a custom RS422 PC port must be built for the
Emax/EII,
 > > > based
 > > > > on the RS422 circuits & ICs of the Mac.
 > > > >
 > > > > ///E-Synthesist
 > > > >
 > > > > --- In emax@yahoogroups.com, tu@ wrote:
 > > > > >
 > > > > > Fantastic! So, is it the same method that the EII uses for
 > bank
 > > > > transfer or something else? Is there
 > > > > > any chance you could document the protocol?
 > > > > >
 > > > > > I think 25-30 seconds should be acceptable for Emax I bank
 > > loads.
 > > > > At least it provides an option
 > > > > > for those who can't or don't want to add SCSI.
 > > > > >
 > > > > > The Emax II load time does sound a bit slow. But it might
 > still
 > > > be
 > > > > of use if someone had a working
 > > > > > Emax II with a dead SCSI chip.
 > > > > >
 > > > > > Out of interest, can the Emax II directly load an Emax I
bank
 > > > (with
 > > > > compressed 8 bit samples) in
 > > > > > this way?
 > > > > >
 > > > > > /Tristan
 > > > > >
 > > > > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
 > > > > >
 > > > > > >
 > > > > > After some experiments during the weekend, the current
status
 > > of
 > > > my
 > > > > > little RS422 project is that I know how to do *fast* bank
 > > > > > loads/unloads on the Emax via RS422.
 > > > > > This should reduce the total data transfer time to 25-30
 > > seconds
 > > > on
 > > > > > the Emax-I instead of the 2-3 minutes of Alchemy. Most
 > probably
 > > > > this
 > > > > > was also the total load time of the OMI CDS3 system, which
 > is -
 > > > > let's
 > > > > > say - "acceptable"...
 > > > > > That's about the same speed as loading from a floppy :-)
but
 > > the
 > > > > > biggest advantage would be that one would have immediate
 > access
 > > > to
 > > > > > hundreds of banks on the PC harddrive instead of having to
 > copy
 > > > > > individual banks to floppy disks first...
 > > > > > Still SCSI is a much better alternative... for those having
a
 > > > rev2
 > > > > or
 > > > > > rev3 board, and for those using the Emax-II. BTW at RS422
 > > speed,
 > > > > the
 > > > > > data transfer time on a fully loaded Emax-II Turbo 8M would
 > be
 > > > > about
 > > > > > 7 minutes :-). Fortunately every Emax-II is equipped with
 > SCSI.
 > > > > >
 > > > > > I have to write some decent software now which supports the
 > > full
 > > > > Emax
 > > > > > handshaking protocol. But I'm pretty sure that the USB<--
 > >RS422
 > > > > > converters will not be the best solution for this
 > > communication -
 > > > > > just like with the EII the communication seems to be quite
 > > > > unreliable
 > > > > > when transmitting data from the PC to the Emax, as a
 > > consequence
 > > > > the
 > > > > > total transfer time increases dramatically due to
handshaking
 > > > > > overhead.
 > > > > > At the end of the week I will have a PCCard RS422 port on
my
 > > > > laptop.
 > > > > > This piece of hardware does not suffer from USB latency, so
I
 > > > hope
 > > > > it
 > > > > > will work better...
 > > > > >
 > > > > > ///E-Synthesist
 > > > > >
 > > > > > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@>
 > wrote:
 > > > > > >
 > > > > > > Yes, I was also thinking there must be some dedicated
 > command
 > > > > (set)
 > > > > > > for fast load/unload. But the fact that John remembered a
 > > load
 > > > > time
 > > > > > > of 5 minutes for the OMI cdroms made me doubt again... On
 > the
 > > > > other
 > > > > > > hand it is true that OMI cdroms could only be used after
 > the
 > > > > > release
 > > > > > > of OS 3.2, so this is indeed an indication that
additional
 > > > > commands
 > > > > > > have been added, or at least some changes have been
 > applied.
 > > I
 > > > > also
 > > > > > > observed that the v 3.2 MIDI protocol is not 100%
behaving
 > as
 > > > > > > described in the v 3.0 document, e.g. the timeout
handling
 > is
 > > > > > > different. So there are also changes in the 'normal'
 > > SYSEX/MMA
 > > > > > > protocol.
 > > > > > > By the way: the OMI drive also required a firmware update
 > in
 > > > > order
 > > > > > to
 > > > > > > be compatible with the Emax. Question is of course
whether
 > > this
 > > > > was
 > > > > > > just a small firmware update (to support the newly added
 > > > commands
 > > > > > in
 > > > > > > the Emax OS) or a huge piece of Emax-specific code (to
 > > > implement
 > > > > > the
 > > > > > > full SYSEX/MMA command set - which is indeed quite
 > > unlikely) ...
 > > > > > >
 > > > > > > The Emax-II and EIII indeed have a filesystem which is
 > > > optimized
 > > > > > for
 > > > > > > handling different banksizes; I have the specs here
because
 > I
 > > > > > needed
 > > > > > > them for EMXP. The EII and Emax are using filesystems
with
 > > > fixed
 > > > > > > filesizes in a sequential order.
 > > > > > >
 > > > > > > Since I don't have any Emax OMI cdrom disk I'm not even
 > sure
 > > > > > whether
 > > > > > > the banks on these disks are "EMX-like" 8-bit images or
 > > > expanded
 > > > > 12
 > > > > > > bit images. It makes sense that they are 8-bit, because
 > this
 > > > > > allowed
 > > > > > > OMI to put more banks on a CD, to transfer them faster to
 > the
 > > > > Emax
 > > > > > > (if EII-like commands have been implemented in the Emax
OS
 > of
 > > > > > course)
 > > > > > > and to use the same bank layout as on the Emax floppy and
 > > Emax
 > > > > > > harddisk banks.
 > > > > > >
 > > > > > > So despite the "5 minutes load time" note from John, I
 > think
 > > we
 > > > > can
 > > > > > > still assume that there is some specific command set in
 > V3.2
 > > > > which
 > > > > > > enables fast bank loads. I will try to find them out
during
 > > the
 > > > > > > weekend, either by experimenting or by looking into the
OS
 > > > > > > binary/disassembled code...
 > > > > > >
 > > > > > > ///E-Synthesist
 > > > > > >
 > > > > > >
 > > > > > >
 > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
 > > > > > > >
 > > > > > > >
 > > > > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
 > > > > > > >
 > > > > > > > >
 > > > > > > > But the 5 minutes load time may have been reality...
 > > > > > > >
 > > > > > > > This can explain why I don't know anyone and find no
 > > > reference
 > > > > at
 > > > > > > all
 > > > > > > > of anyone who actually used this CD-ROM drive with the
 > > Emax.
 > > > If
 > > > > > > this
 > > > > > > > 5 minutes load time is true, this must have resulted in
a
 > > > > > > commercial
 > > > > > > > failure for OMI when they launched the Emax OMI cd
 > disks...
 > > > but
 > > > > > > they
 > > > > > > > probably released these disks also in Mac/SD format ?
 > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > > Yes, such a slow load time would have been a major
 > > marketing
 > > > > > > problem. I find it difficult to imagine that Emu would
not
 > > have
 > > > > > added
 > > > > > > the small amount of
 > > > > > > > extra code required to load in a bank quickly via
RS422.
 > If
 > > > > they
 > > > > > > wanted to sell Emaxes then surely there was a strong
 > > incentive
 > > > to
 > > > > > > make the sound
 > > > > > > > library efficient to use. I suspect the OMI CDROM
system
 > > for
 > > > > the
 > > > > > > Emax was not a major market success because of the cost.
 > The
 > > > OMI
 > > > > > > CDROM drive, or
 > > > > > > > even a Mac with a CDROM drive, would have cost a
 > > significant
 > > > > > > proportion of the cost of an Emax. The average musician
 > > > probably
 > > > > > > would not have been
 > > > > > > > able to justify that additional expense. Particularly
so
 > > > given
 > > > > > that
 > > > > > > early CDROM drives were rather fragile.
 > > > > > > >
 > > > > > > > >
 > > > > > > >
 > > > > > > > And yes, Emu has done strange things. E.g. the EII
cdrom
 > > kit
 > > > > > > > supported a "folder" or "category" system: the banks on
a
 > > > disk
 > > > > > > could
 > > > > > > > be put in folders (like bank "piano" in
folder "acoustic
 > > > > > > keyboards")
 > > > > > > > to make navigation much easier. This feature was not
 > > > available
 > > > > on
 > > > > > > the
 > > > > > > > Emax and EIII harddisks. Maybe Emu considered this to
be
 > a
 > > > > > feature
 > > > > > > of
 > > > > > > > OMI and not of Emu themselves, but they could have
 > learned
 > > > from
 > > > > > > > that...
 > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > > Surely the category organisation was only a feature of
 > the
 > > > OMI
 > > > > > > CDROM system, as the EII had no control over it. So it
was
 > > > OMI's
 > > > > > > CDROM format, not
 > > > > > > > Emu's format. But this also gave OMI the flexibility to
 > put
 > > > as
 > > > > > many
 > > > > > > banks on the disk as they wanted and to organise them as
 > they
 > > > > > wanted.
 > > > > > > There was
 > > > > > > > no restriction on how OMI could do this as long as they
 > > could
 > > > > > serve
 > > > > > > up the full memory image of each bank to the EII via the
 > > RS422
 > > > > port
 > > > > > > when required.
 > > > > > > >
 > > > > > > > Don't the Emax and the EII hard disk formats allocate a
 > > fixed
 > > > > > > number of banks for the disk? I believe you cannot fit
any
 > > more
 > > > > > banks
 > > > > > > on the disk even if
 > > > > > > > the existing banks are only half full of samples.
 > > Presumably
 > > > > this
 > > > > > > is because the Emax and EII use a fixed memory size for
 > each
 > > > bank
 > > > > > and
 > > > > > > the complete
 > > > > > > > data for the bank is copied directly between memory and
 > > disk
 > > > > when
 > > > > > > you load or save a bank. Each hard disk bank is a the
 > > > equivalent
 > > > > of
 > > > > > > one floppy disk
 > > > > > > > image minus the OS data. I believe the Emax II and EIII
 > use
 > > > > > > variable sized banks. Therefore the number of banks
stored
 > on
 > > a
 > > > > > hard
 > > > > > > disk or CDROM
 > > > > > > > depends on how much data is contained in each bank. But
I
 > > > > believe
 > > > > > > there is still a limit of 100 banks per disk.
 > > > > > > >
 > > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > > RS422 Communication with the Emulator was designed
based
 > on
 > > > > > > following
 > > > > > > > key principles:
 > > > > > > > - all communication, including request/reply for
 > parameter
 > > > > > changes,
 > > > > > > > occurs at 500 Kbaud
 > > > > > > > - a whole bank can be downloaded/loaded with one
special
 > > > > designed
 > > > > > > > type of command (a command which actually directly
 > > > reads/writes
 > > > > > the
 > > > > > > > RAM memory segments in which the bank data is residing)
 > > > > > > > - bulk data load/unload occurs with data packets sized
 > 256
 > > > > bytes,
 > > > > > > of
 > > > > > > > which each byte represents 1 sample point (data is
 > > > transferred
 > > > > in
 > > > > > > > compressed format)
 > > > > > > >
 > > > > > > > On the Emax, they seem to have decided that choosing
for
 > a
 > > > > > > *standard*
 > > > > > > > medium speed protocol was more important than choosing
 > for
 > > a
 > > > > > > > *proprietary* high speed protocol. So they went for the
 > > MIDI
 > > > > > > > SYSES/MMA approach:
 > > > > > > > - all basic communication, including all
 > > > commands/instructions,
 > > > > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI
sockets
 > > or
 > > > > the
 > > > > > > DB9
 > > > > > > > RS422 port are being used.
 > > > > > > > - loading/unloading banks requires the full set of
SYSEX
 > > > > > commands.
 > > > > > > > Hence to simply download the parameters of just one
voice
 > > of
 > > > > just
 > > > > > > one
 > > > > > > > preset, already multiple commands must be exchanged
with
 > > the
 > > > > > Emax.
 > > > > > > > This is due to the fact that in general only one
 > parameter
 > > > can
 > > > > be
 > > > > > > > transferred per command. And this must be done at the
 > slow
 > > > > 31.25
 > > > > > > > Kbaud speed...mmmm...
 > > > > > > > - bulk data (sample) load/unload occurs with data
packets
 > > > sized
 > > > > > > only
 > > > > > > > 120 bytes (MMA standard). Moreover each sample point
 > > requires
 > > > > 12
 > > > > > > bits
 > > > > > > > now instead of 8 bits on the EII since data is
 > transferred
 > > in
 > > > > > > linear
 > > > > > > > format instead of compressed format.
 > > > > > > > As a consequence, loading/unloading banks is much
slower
 > > than
 > > > > on
 > > > > > > the
 > > > > > > > EII. Of course, once they released the Emax-II, they
 > would
 > > > have
 > > > > > > faced
 > > > > > > > problems anyway. This machine could have up to 8MB
banks
 > > and
 > > > > > > doesn't
 > > > > > > > use compression, so even at full 500 kbaud speed and
 > using
 > > > only
 > > > > > one
 > > > > > > > command - which is impossible in reality - the Emax-II
 > > would
 > > > > > > require
 > > > > > > > at least 2.7 minutes for loading/unloading banks.
 > > Fortunately
 > > > > > there
 > > > > > > > was something invented called SCSI :-)
 > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > > Have a look at the MIDI spec for the Emax V3.0
software.
 > > The
 > > > > fast
 > > > > > > (RS422) dumps use a protocol based on the MIDI SDS but
 > > slightly
 > > > > > > modified. The
 > > > > > > > sample data is dumped as 12 bit linear but the samples
 > are
 > > > > packed
 > > > > > > so that two 12 bit samples are transferred in three 8 bit
 > > > bytes.
 > > > > It
 > > > > > > is also of note that
 > > > > > > > sending 8 bit wide data in this way violates the MIDI
 > > > standard,
 > > > > > as
 > > > > > > bit7 is always reserved as an indicator of a status byte.
 > Of
 > > > > course
 > > > > > > this is not really an
 > > > > > > > issue here as the 500k baud RS422 data is only being
 > > > > transferred
 > > > > > > to/from the Emax so no other MIDI devices will ever see
 > this
 > > > > > > violation of the
 > > > > > > > standard. But the outcome is that dumping samples as 12
 > bit
 > > > > only
 > > > > > > takes 50% longer than dumping as 8 bit compressed. Doing
a
 > > > proper
 > > > > > > MIDI SDS dump
 > > > > > > > of 8 bit or 12 bit data actually takes the same amount
of
 > > > time
 > > > > as
 > > > > > > only 7 data bits can be transferred for each byte in the
 > > > message.
 > > > > > So
 > > > > > > an 8 bit dump
 > > > > > > > takes two bytes per sample (7 + 1) while a 12 bit dump
 > also
 > > > > > > requires two bytes per sample (7 + 5). 16 bit dumps are
 > even
 > > > > slower
 > > > > > > as they require three
 > > > > > > > bytes per sample (7 + 7 + 2).
 > > > > > > >
 > > > > > > > As you have said, the failure to provide a means of
 > > directly
 > > > > > > transferring banks into memory via RS422 seems to be the
 > > > problem
 > > > > in
 > > > > > > the Emax, at least as
 > > > > > > > documented in the V3.0 MIDI spec. But if the V3.0 spec
 > > > already
 > > > > > > provides all the functions required to load banks from
the
 > > > CDROM
 > > > > > > drive using MIDI
 > > > > > > > SYSEX and RS422, then why is V3.2 or the SE software
 > > claimed
 > > > to
 > > > > > add
 > > > > > > OMI CDROM support? It still seems likely to me that some
 > > extra
 > > > > > > functions were
 > > > > > > > added in those versions to support fast bank loading
via
 > > > RS422.
 > > > > > If
 > > > > > > not, then the OMI CDROM drive would have to be converting
 > the
 > > 8
 > > > > bit
 > > > > > > compressed
 > > > > > > > sample data on the CDROM to 12 bit linear in order to
 > dump
 > > > the
 > > > > > > samples into the Emax. The Emax would then have to
convert
 > > the
 > > > 12
 > > > > > bit
 > > > > > > linear samples
 > > > > > > > back to compressed 8 bit samples. The transfer of
samples
 > > > would
 > > > > > > also take 50% longer for 12 bit linear compared to 8 bit
 > > > > > compressed.
 > > > > > > And of course
 > > > > > > > there would be no way for sequencer data included in
the
 > > bank
 > > > > to
 > > > > > be
 > > > > > > loaded into the Emax. I could be wrong, but it just seems
 > > > > unlikely
 > > > > > > Emu would have
 > > > > > > > made it so difficult when a small software update to
the
 > > Emax
 > > > > > could
 > > > > > > make bank dumping work in much the same way as the EII.
 > > > > > > >
 > > > > > > > >
 > > > > > > >
 > > > > > > > Nevertheless I will still do some experiments to find
out
 > > if
 > > > > the
 > > > > > > Emax
 > > > > > > > OS doesn't have any "fast bank load" commands...
 > > > > > > > By the way: does anyone know whether the binary code of
 > the
 > > > > Emax
 > > > > > OS
 > > > > > > > can easily be de-compiled/disassembled in some way in
 > order
 > > > to
 > > > > > get
 > > > > > > > some kind of source code ? Is a simple Z80 disassembler
 > > > > > sufficient ?
 > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > > Unfortunately it seems the only way is to experiment
and
 > > see
 > > > > what
 > > > > > > can be uncovered. The Emax NS32000 main CPU code can be
 > > > > > disassembled
 > > > > > > but it is
 > > > > > > > not a common processor. The hard part of analyzing the
 > > > > > disassembled
 > > > > > > code is working out where the program and data begins and
 > > ends
 > > > as
 > > > > > > well as what
 > > > > > > > interrupt routines are being handled at runtime and how
 > > they
 > > > > > > interact. You would need to combine together the code
from
 > > the
 > > > > disk
 > > > > > > OS image and the
 > > > > > > > EPROM into a processor memory map. Various hardware
 > > > peripherals
 > > > > > > will also probably exist at certain addresses in the
memory
 > > > map.
 > > > > To
 > > > > > > pull it all
 > > > > > > > together you will ideally have the circuit schematics,
 > the
 > > > > memory
 > > > > > > map, CPU/chip documentation plus a detailed design
 > > description
 > > > of
 > > > > > how
 > > > > > > the system
 > > > > > > > works. Often much of this data can be found in the
 > product
 > > > > > service
 > > > > > > manual. Then you need to determine which routines are
 > called
 > > > when
 > > > > > > MIDI/RS422
 > > > > > > > interrupts are handled. Testing with a logic analyzer
 > > probing
 > > > > the
 > > > > > > CPU would certainly make that easier.
 > > > > > > >
 > > > > > > > /Tristan
 > > > > > > >
 > > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > > ///E-Synthesist
 > > > > > > >
 > > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
 > > > > > > > >
 > > > > > > > > That seems excessively slow, as the EII could load a
 > > > similar
 > > > > > > sized
 > > > > > > > bank from the same CDROM
 > > > > > > > > drive in 12 seconds. Its hard to imagine Emu would
not
 > > have
 > > > > > > > implemented a similar load time on
 > > > > > > > > the Emax if all it took was adding a software
routine.
 > > But
 > > > > then
 > > > > > > > again, stranger things have
 > > > > > > > > happened...
 > > > > > > > >
 > > > > > > > > /Tristan
 > > > > > > > >
 > > > > > > > > Quoting John Silveria II <john@>:
 > > > > > > > >
 > > > > > > > > > Somewhere, and I can't remember where, I read that
 > the
 > > CD-
 > > > > Rom
 > > > > > > > drive
 > > > > > > > > > took
 > > > > > > > > > up to 5 minutes to load a bank. I wish I could
 > remember
 > > > > > where.
 > > > > > > So
 > > > > > > > > > indeed
 > > > > > > > > > it was not only as slow as typical SYSEX load, it
 > could
 > > > > > > actually
 > > > > > > > take
 > > > > > > > > >
 > > > > > > > > > longer.
 > > > > > > > > >
 > > >
 > >
 >





[Non-text portions of this message have been removed]

Re: RS422 fun

2008-11-22 by esynthesist

OK. If I was able to connect the clock of the Emax with the RS422 
port I would have done so from the very beginning of course :-)

But that's the whole problem: I haven't found a new PC RS422 port yet 
which is capable of being externally clocked. Also the specs provided 
on many vendor's websites are pretty vague.
Perhaps some high end RS422 automation ports can be clocked, but 
these devices tend to be quite expensive (and still seem not to have 
this feature; the higher price is due to additional protection, 
better hardcases, breakout boxes, multiple ports, etc).

So: if anyone knows where to buy an affordable RS422 port (USB or PC 
Card/Express Card) which is externally clockable, I love to hear it !!

(Note: as far as I know the EII has the same serial communication 
setup as the Emax. Does this mean that the statement in the Emu 
document saying that the RS422 communication is "asynchronous" is a 
type/wrong ?)

///E-Synthesist

--- In emax@yahoogroups.com, tu@... wrote:
>
> Ok, this explains why you are seeing errors in the data coming from 
the PC but not with data going to the PC. You are running the PC 
RS422 interfaces 
> asynchronously when they need to synchronous with the Emax clock. 
Your cable also does not have the 500kHz clock from the Emax 
connected!
> 
> When your PC RS422 interface is set to 500k baud with its internal 
clock the PC RS422 interface can receive the data from the Emax 
perfectly because 
> the data is transmitted in the same format as a standard 
asynchronous UART transmission. However, the 6850 UART in the Emax is 
running in x1 
> synchronous mode, where it needs one correctly aligned clock pulse 
for each start, stop and data bit received. As the Emax UART RX clock 
is fed from 
> the same 500kHz clock that appears on its RS422 port, the received 
data needs to be properly synchronized with that clock edge. 
> 
> With your currect interfaces the PC UART will be happily 
transmitting data in sync with its internal clock but the 
asynchronous bit transitions will not 
> always be in sync with the Emax 500kHz clock. Because of this the 
Emax will sometimes appear to work correctly but then the clock to 
data relationship 
> will drift and there will be corruption in the received data. 
> 
> The best solution for this would be to get another RS422 card that 
allows operation from an external clock in x1 mode. The 500kHz x1 
UART clock is 
> transmitted from pin 7 of the Emax RS422 connector and needs to be 
connected to the PC RS422 external clock input. Note that the CTS/RTS 
pins on 
> serial ports are for hardware handshaking and not normally used as 
clock inputs. The Mac serial interface uses its HSKi pin as its 
external clock input 
> but how this is implemented in another RS422 may be different.
> 
> /Tristan
> 
> Saturday, November 22, 2008, 9:03:23 PM, you wrote:
> 
> >
> About the hardware I have used until now:
> 
> Serial ports:
> - Meilhaus Redcom USB-COMI RS422 USB port. Also sold with other 
brand 
> names such as Easysync; very popular one. --> This is the one I 
have 
> best results with. Internal clockable at 500kbaud. 
> - Moxa Uport 1150 RS422/RS232 USB port. This device does not 
support 
> RTS/CTS handshaking for RS422 and is not internally clockable at 
500 
> kbaud. So it's useless :-)
> - Exsys EX-1362 double RS422 PCMCIA card. This one has the same 
> features as the Meilhaus but the results where less reliable.
> - Ednet RS232 USB adapter 84204. A cheap RS232 device, just to see 
if 
> this wouldn't work. It didn't. 
> 
> Cable/wiring:
> Until now I only used the GND and DATA signals, so I connected 5 
pins 
> of the Emax/Emulator II to the PC RS422 as follows:
> - Emax PIN 3 (GND) to RS422 PIN 5 (GND)
> - Emax PIN 4 (RXD+) to RS422 PIN 2 (TXD+)
> - Emax PIN 5 (RXD-) to RS422 PIN 1 (TXD-)
> - Emax PIN 8 (TXD+) to RS422 PIN 3 (RXD+)
> - Emax PIN 9 (TXD-) to RS422 PIN 4 (RXD-)
> The cable is a 10-wire shielded cable of 1.5 meters long.
> 
> (I already spent 300 EUR on serial devices, so I'm not planning to 
> buy additional ones anymore :-)
> 
> Final note: before I started this project with the EII/Emax, I had 
> never programmed/monitored a serial device before, so let's say 
that 
> my hardware/RS422 experience is low but increasing ...
> 
> ///E-Synthesist
> 
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > I think the solution here really depends on the actual cause of 
the 
> problem. It may even be just some simple thing like the cable 
wiring 
> or a driver 
> > setting for the PC RS422 hardware. It would be helpful if you 
could 
> provide some more detail on the hardware you are using. For a 
start, 
> the exact 
> > brand and model number of the RS422 interfaces and cables plus 
the 
> wiring diagrams of the cables.
> > 
> > The best case would be if you could get an existing PC RS422 
> interface to work with the Emax with no hardware modification. 
> Otherwise the solutions 
> > start to get more complicated, such as modifying circuits, 
building 
> an interface board or even having a microcontroller sitting between 
> the PC and the 
> > Emax doing protocol translation. But now you have the Emax 
> protocols worked out I believe a solution can be achieved. 
> > 
> > If you don't have the tools to measure what is going on in the 
> interface circuits then you will have difficulty sorting this out. 
I 
> would suggest using a 
> > digital oscilloscope to measure the TX and RX data signals plus 
the 
> 500kHz clock at the Emax 6850 UART chip when the Emax is actually 
> communicating 
> > with both the Mac and the PC. You will need at least two 
> oscilloscope channels to see the clock and the data simultaneously. 
> More channels would be 
> > nice, but the TX data and clock together and RX data and clock 
> together are the first things to look at. You could also use a 
logic 
> analyzer but I think an 
> > oscilloscope is better because it will show the actual waveforms, 
> not just the logic transitions.
> > 
> > Unfortunately the Emax and Mac RS422 interfaces are products of 
> their times, and times move on. No doubt it was a reasonable 
decision 
> to implement 
> > the interface to the host computer this way back in the 1980s.
> > 
> > The sysex timeout is related to the dumping protocol and has no 
> real bearing on what happens with the clocking at the data tranfer 
> layer. But you could 
> > always experiment with it to see if it makes any difference to 
the 
> problem you are seeing. At this stage we do not know for sure that 
> the problem is at 
> > the low level.
> > 
> > I am not sure how much experience you have with hardware and 
> communications troubleshooting but I am happy to help or provide 
> further if you 
> > would like to pursue this. As I said in a previous email, I would 
> like to see a general solution that would allow any of the Emu 
RS422 
> equipped samplers 
> > to be connected to a modern PC for sample dumping and/or bank 
> transfer (where applicable). You have done fabulous work with the 
> EMXP program and 
> > seem to have the software and Emu formats and protocols worked 
out. 
> So I think getting this happening should not be too hard :)
> > 
> > /Tristan
> > 
> > Saturday, November 22, 2008, 12:00:21 AM, you wrote:
> > 
> > >
> > Thanks Tristan.
> > 
> > I'm wondering though: even if we find the actual cause of the 
> problem 
> > (timing or signal level), I guess there's not much we can do to 
> solve 
> > the problem. Besides making a custom communication board of 
course.
> > Because I don't think characteristics such as "clock to data 
> > relationship" can be configured on any normal commercial RS422 
port 
> > device for PCs, right ?
> > That's in fact the only reason why I didn't invest in a scope 
yet: 
> > exactly knowing the problem would be nice, but not being able to 
> > solve it would be frustrating :-)
> > Man ! I would love the standard PC RS422 ports to be externally 
> > clockable ! Why is this (once again) one of those "Mac"-only 
> > features !
> > 
> > Question: the RS422 communication "timeout period" on the Emax 
can 
> be 
> > configured with a SYSEX command (from 1 to 127 seconds). But I 
> guess 
> > this is not something that can help on the lowel level data 
> > syncronization problem we are dealing with here, right ? I 
> > guess "our" problem is more related to the speed at which a 
stream 
> of 
> > bits (as a whole) is entering the Emax port ?
> > 
> > ///E-Synthesist 
> > 
> > --- In emax@yahoogroups.com, tu@ wrote:
> > >
> > > Yes, an oscilloscope is what you need. I suggest getting a 
> digital 
> > model as it should allow you to capture and store the signals you 
> are 
> > measuring. Some 
> > > high end multimeters also have oscilloscope functions, but 
check 
> > the bandwidth is well above the highest frequencies you will need 
> to 
> > measure. An audio 
> > > card is not suitable for this task.
> > > 
> > > I did a search on the Mac serial port and it seems that while 
the 
> > output voltage levels are slightly non standard they should not 
> > present any problems for 
> > > the Emax 9637 RS422 receiver chip. I only have the Emax II 
> > schematics but I believe the RS422 interface should be the same 
as 
> > the Emax. The 9637 
> > > circuit doesn't appear to have any EMI supression or 
termination 
> > other than a pullup to +5V on the noninverting input. So the Emax 
> is 
> > relying on the 
> > > sending circuit to ensure a reasonably clean signal arrives. 
The 
> > Mac has an EMI filter on its RS422 port but I am not sure what 
your 
> > PC RS422 port may 
> > > have.
> > > 
> > > Another thing to look at is the relationship between the 500kHz 
> > clock the Emax sends out and the data that is sent back to the 
Emax 
> > from the PC. The 
> > > 6850 UART in the Emax relies on a this being within a certain 
> > timing range. If the clock to data relationship from the PC RS422 
> > port is not the same as 
> > > from the Mac then this could cause problems. The same would 
also 
> > occur if the PC RS422 transmit clock is drifting because is not 
> > locked to the same 
> > > clock that it is receiving from the Emax. Of course the data 
> being 
> > sent from the Emax to the PC will be ok because the clock and 
data 
> > are transmitted 
> > > together with the correct timing relationship.
> > > 
> > > /Tristan
> > > 
> > > Tuesday, November 18, 2008, 3:58:48 AM, you wrote:
> > > 
> > > >
> > > To have 100% certainty about the actual problem I should indeed 
> do 
> > > some measurements with an oscilloscope... but I don't have one.
> > > I was (and still) am thinking about buying one, either analog 
or 
> > > digital. Until now I only did some measurements with an 
external 
> > > audio card acting as a wave recorder, but its sampling 
frequency 
> > and 
> > > bandwith are - of course - insufficient to do proper 
measurements 
> > on 
> > > 500kbaud signals. What I do see however - even with this 
method - 
> > is 
> > > that the amplitude level of the Mac signal is much higher than 
> the 
> > PC 
> > > signal.
> > > On the other hand, if the RS422 of the Emax is standard, then I 
> > > shouldn't have any problem. Mmmm... 
> > > Yes, the best solution would consist of a custom RS422 port for 
> the 
> > > PC which can even be externally clocked. But I'm not an 
> electronics 
> > > specialist so it will take a looooonnnnng time before I will 
end 
> up 
> > > with a working set :-)
> > > 
> > > ///E-Synthesist
> > > 
> > > --- In emax@yahoogroups.com, tu@ wrote:
> > > >
> > > > I am not sure about the Mac circuitry but the RS422 interface 
> on 
> > > the Emax should just be standard 
> > > > 9637 and 9638 RS422 buffers. The input threshold on the 9637 
> > > receiver is specified to be +/- 
> > > > 200mV so it should work with voltages higher than that. Do 
you 
> > have 
> > > an oscilloscope that you can 
> > > > use to probe the 9637 while it is receiving data? If so, you 
> > could 
> > > compare when receiving data 
> > > > from the Mac and the PC via RS422.
> > > > 
> > > > Its not a priority, but I think it would be worthwhile to 
have 
> an 
> > > RS422 interface that would allow 
> > > > any PC to be used for sample dumping to the Emax I, Emax II, 
> EII, 
> > > EIII and EIIIx as well as bank 
> > > > transfer with the EII and Emax. Even if an interface box cost 
> > some 
> > > money I feel there would be a 
> > > > demand given the numbers of these samplers still in use. The 
> Emu 
> > > world cannot live on old Macs 
> > > > alone :)
> > > > 
> > > > /Tristan
> > > > 
> > > > Monday, November 17, 2008, 3:24:57 AM, you wrote:
> > > > 
> > > > >
> > > > After some additional testing I'm pretty sure the problems 
are 
> > not 
> > > > caused by timing differences, but by voltage levels. 
> > > > I received a PCMCIA RS422 port this week, and this thing has 
> even 
> > > > more problems with communicating with the EII and the Emax 
than 
> > my 
> > > > USB/RS422 converter device. And again the communication 
problem 
> > is 
> > > to 
> > > > be found in the PC->Emax transmit part, not in the receive 
part.
> > > > I mentioned before that the Mac RS422 is sending very high 
> signal 
> > > > levels (higher than "officially" allowed by the RS422 
> standard). 
> > > The 
> > > > Emu samplers seem to rely on these high signals.
> > > > Conclusion: I give up the current experiments. Perhaps some 
> time 
> > in 
> > > > the future I'll try to make a device based on Mac circuits...
> > > > 
> > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > >
> > > > > Ok, that is interesting.
> > > > > 
> > > > > An alternative to direct connection of the RS422 to the PC 
> > would 
> > > be 
> > > > a microcontroller sitting 
> > > > > between the PC and sampler. I think someone suggested that 
> > > before. 
> > > > It could respond to the 
> > > > > sampler with tight timing but handle the loose timing over 
> the 
> > PC 
> > > > connection. I guess the PC side 
> > > > > could be implemented with either RS-232 or USB. But 
obviously 
> > USB 
> > > > would require a lot more 
> > > > > coding than simply translating RS422 and RS232 port 
protocols 
> > > with 
> > > > a bit of buffering in between.
> > > > > 
> > > > > /Tristan
> > > > > 
> > > > > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
> > > > > 
> > > > > >
> > > > > Yes it's about the same concept as on the EII: taking an 
> exact 
> > > dump 
> > > > > of the internal Emax memory at 500 kbaud in both 
directions. 
> Or 
> > > in 
> > > > > other words... transferring an EMX file across the serial 
> line 
> > > > > (except for the EMX 39 byte header string of course).
> > > > > 
> > > > > But there are two major drawbacks compared with the EII: 
> > > > > 1/ the Emax uses the MMA standard to accomplish this dump, 
> > > meaning 
> > > > > that the data is sent in packets of 120 bytes instead of 
256 
> > > bytes, 
> > > > > which is slower.
> > > > > 2/ it's not possible to dump specific memory segments, the 
> > whole 
> > > > > thing must be dumped in one sequential loop from the very 
> > > beginning 
> > > > > (position 0) to the very end (position 552959). 
> > > > > 
> > > > > The second one is a BIG problem: it means that if something 
> > goes 
> > > > > wrong (like a bad packet) the whole dump must be restarted.
> > > > > And... since the PC RS422 communication line with the Emax 
is 
> > not 
> > > > > optimal, this kind of error will for sure occur during a 
bank 
> > > > > transfer. On the EII, this means simply re-asking for the 
> > > > particular 
> > > > > bad data packet, but on the Emax you have to start all over 
> > again.
> > > > > 
> > > > > In practice this means that a full load/unload is simply 
not 
> > > > possible 
> > > > > with my current hardware (USB-RS422 and USB-RS232 
converters 
> of 
> > > all 
> > > > > kinds) because the loop is restarted endlessly. At the end 
of 
> > the 
> > > > > week I'll try an non-USB port device, I hope that one will 
> work.
> > > > > If not, a custom RS422 PC port must be built for the 
> Emax/EII, 
> > > > based 
> > > > > on the RS422 circuits & ICs of the Mac.
> > > > > 
> > > > > ///E-Synthesist
> > > > > 
> > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > >
> > > > > > Fantastic! So, is it the same method that the EII uses 
for 
> > bank 
> > > > > transfer or something else? Is there 
> > > > > > any chance you could document the protocol? 
> > > > > > 
> > > > > > I think 25-30 seconds should be acceptable for Emax I 
bank 
> > > loads. 
> > > > > At least it provides an option 
> > > > > > for those who can't or don't want to add SCSI. 
> > > > > > 
> > > > > > The Emax II load time does sound a bit slow. But it might 
> > still 
> > > > be 
> > > > > of use if someone had a working 
> > > > > > Emax II with a dead SCSI chip.
> > > > > > 
> > > > > > Out of interest, can the Emax II directly load an Emax I 
> bank 
> > > > (with 
> > > > > compressed 8 bit samples) in 
> > > > > > this way? 
> > > > > > 
> > > > > > /Tristan
> > > > > > 
> > > > > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
> > > > > > 
> > > > > > >
> > > > > > After some experiments during the weekend, the current 
> status 
> > > of 
> > > > my 
> > > > > > little RS422 project is that I know how to do *fast* bank 
> > > > > > loads/unloads on the Emax via RS422. 
> > > > > > This should reduce the total data transfer time to 25-30 
> > > seconds 
> > > > on 
> > > > > > the Emax-I instead of the 2-3 minutes of Alchemy. Most 
> > probably 
> > > > > this 
> > > > > > was also the total load time of the OMI CDS3 system, 
which 
> > is - 
> > > > > let's 
> > > > > > say - "acceptable"... 
> > > > > > That's about the same speed as loading from a floppy :-) 
> but 
> > > the 
> > > > > > biggest advantage would be that one would have immediate 
> > access 
> > > > to 
> > > > > > hundreds of banks on the PC harddrive instead of having 
to 
> > copy 
> > > > > > individual banks to floppy disks first... 
> > > > > > Still SCSI is a much better alternative... for those 
having 
> a 
> > > > rev2 
> > > > > or 
> > > > > > rev3 board, and for those using the Emax-II. BTW at RS422 
> > > speed, 
> > > > > the 
> > > > > > data transfer time on a fully loaded Emax-II Turbo 8M 
would 
> > be 
> > > > > about 
> > > > > > 7 minutes :-). Fortunately every Emax-II is equipped with 
> > SCSI.
> > > > > > 
> > > > > > I have to write some decent software now which supports 
the 
> > > full 
> > > > > Emax 
> > > > > > handshaking protocol. But I'm pretty sure that the USB<--
> > >RS422 
> > > > > > converters will not be the best solution for this 
> > > communication - 
> > > > > > just like with the EII the communication seems to be 
quite 
> > > > > unreliable 
> > > > > > when transmitting data from the PC to the Emax, as a 
> > > consequence 
> > > > > the 
> > > > > > total transfer time increases dramatically due to 
> handshaking 
> > > > > > overhead. 
> > > > > > At the end of the week I will have a PCCard RS422 port on 
> my 
> > > > > laptop. 
> > > > > > This piece of hardware does not suffer from USB latency, 
so 
> I 
> > > > hope 
> > > > > it 
> > > > > > will work better...
> > > > > > 
> > > > > > ///E-Synthesist
> > > > > > 
> > > > > > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@> 
> > wrote:
> > > > > > >
> > > > > > > Yes, I was also thinking there must be some dedicated 
> > command 
> > > > > (set) 
> > > > > > > for fast load/unload. But the fact that John remembered 
a 
> > > load 
> > > > > time 
> > > > > > > of 5 minutes for the OMI cdroms made me doubt again... 
On 
> > the 
> > > > > other 
> > > > > > > hand it is true that OMI cdroms could only be used 
after 
> > the 
> > > > > > release 
> > > > > > > of OS 3.2, so this is indeed an indication that 
> additional 
> > > > > commands 
> > > > > > > have been added, or at least some changes have been 
> > applied. 
> > > I 
> > > > > also 
> > > > > > > observed that the v 3.2 MIDI protocol is not 100% 
> behaving 
> > as 
> > > > > > > described in the v 3.0 document, e.g. the timeout 
> handling 
> > is 
> > > > > > > different. So there are also changes in the 'normal' 
> > > SYSEX/MMA 
> > > > > > > protocol.
> > > > > > > By the way: the OMI drive also required a firmware 
update 
> > in 
> > > > > order 
> > > > > > to 
> > > > > > > be compatible with the Emax. Question is of course 
> whether 
> > > this 
> > > > > was 
> > > > > > > just a small firmware update (to support the newly 
added 
> > > > commands 
> > > > > > in 
> > > > > > > the Emax OS) or a huge piece of Emax-specific code (to 
> > > > implement 
> > > > > > the 
> > > > > > > full SYSEX/MMA command set - which is indeed quite 
> > > unlikely) ...
> > > > > > > 
> > > > > > > The Emax-II and EIII indeed have a filesystem which is 
> > > > optimized 
> > > > > > for 
> > > > > > > handling different banksizes; I have the specs here 
> because 
> > I 
> > > > > > needed 
> > > > > > > them for EMXP. The EII and Emax are using filesystems 
> with 
> > > > fixed 
> > > > > > > filesizes in a sequential order.
> > > > > > > 
> > > > > > > Since I don't have any Emax OMI cdrom disk I'm not even 
> > sure 
> > > > > > whether 
> > > > > > > the banks on these disks are "EMX-like" 8-bit images or 
> > > > expanded 
> > > > > 12 
> > > > > > > bit images. It makes sense that they are 8-bit, because 
> > this 
> > > > > > allowed 
> > > > > > > OMI to put more banks on a CD, to transfer them faster 
to 
> > the 
> > > > > Emax 
> > > > > > > (if EII-like commands have been implemented in the Emax 
> OS 
> > of 
> > > > > > course) 
> > > > > > > and to use the same bank layout as on the Emax floppy 
and 
> > > Emax 
> > > > > > > harddisk banks.
> > > > > > > 
> > > > > > > So despite the "5 minutes load time" note from John, I 
> > think 
> > > we 
> > > > > can 
> > > > > > > still assume that there is some specific command set in 
> > V3.2 
> > > > > which 
> > > > > > > enables fast bank loads. I will try to find them out 
> during 
> > > the 
> > > > > > > weekend, either by experimenting or by looking into the 
> OS 
> > > > > > > binary/disassembled code...
> > > > > > > 
> > > > > > > ///E-Synthesist
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > > > >
> > > > > > > > 
> > > > > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
> > > > > > > > 
> > > > > > > > >
> > > > > > > > But the 5 minutes load time may have been reality...
> > > > > > > > 
> > > > > > > > This can explain why I don't know anyone and find no 
> > > > reference 
> > > > > at 
> > > > > > > all 
> > > > > > > > of anyone who actually used this CD-ROM drive with 
the 
> > > Emax. 
> > > > If 
> > > > > > > this 
> > > > > > > > 5 minutes load time is true, this must have resulted 
in 
> a 
> > > > > > > commercial 
> > > > > > > > failure for OMI when they launched the Emax OMI cd 
> > disks... 
> > > > but 
> > > > > > > they 
> > > > > > > > probably released these disks also in Mac/SD format ?
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Yes, such a slow load time would have been a major 
> > > marketing 
> > > > > > > problem. I find it difficult to imagine that Emu would 
> not 
> > > have 
> > > > > > added 
> > > > > > > the small amount of 
> > > > > > > > extra code required to load in a bank quickly via 
> RS422. 
> > If 
> > > > > they 
> > > > > > > wanted to sell Emaxes then surely there was a strong 
> > > incentive 
> > > > to 
> > > > > > > make the sound 
> > > > > > > > library efficient to use. I suspect the OMI CDROM 
> system 
> > > for 
> > > > > the 
> > > > > > > Emax was not a major market success because of the 
cost. 
> > The 
> > > > OMI 
> > > > > > > CDROM drive, or 
> > > > > > > > even a Mac with a CDROM drive, would have cost a 
> > > significant 
> > > > > > > proportion of the cost of an Emax. The average musician 
> > > > probably 
> > > > > > > would not have been 
> > > > > > > > able to justify that additional expense. Particularly 
> so 
> > > > given 
> > > > > > that 
> > > > > > > early CDROM drives were rather fragile.
> > > > > > > > 
> > > > > > > > >
> > > > > > > > 
> > > > > > > > And yes, Emu has done strange things. E.g. the EII 
> cdrom 
> > > kit 
> > > > > > > > supported a "folder" or "category" system: the banks 
on 
> a 
> > > > disk 
> > > > > > > could 
> > > > > > > > be put in folders (like bank "piano" in 
> folder "acoustic 
> > > > > > > keyboards") 
> > > > > > > > to make navigation much easier. This feature was not 
> > > > available 
> > > > > on 
> > > > > > > the 
> > > > > > > > Emax and EIII harddisks. Maybe Emu considered this to 
> be 
> > a 
> > > > > > feature 
> > > > > > > of 
> > > > > > > > OMI and not of Emu themselves, but they could have 
> > learned 
> > > > from 
> > > > > > > > that...
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Surely the category organisation was only a feature 
of 
> > the 
> > > > OMI 
> > > > > > > CDROM system, as the EII had no control over it. So it 
> was 
> > > > OMI's 
> > > > > > > CDROM format, not 
> > > > > > > > Emu's format. But this also gave OMI the flexibility 
to 
> > put 
> > > > as 
> > > > > > many 
> > > > > > > banks on the disk as they wanted and to organise them 
as 
> > they 
> > > > > > wanted. 
> > > > > > > There was 
> > > > > > > > no restriction on how OMI could do this as long as 
they 
> > > could 
> > > > > > serve 
> > > > > > > up the full memory image of each bank to the EII via 
the 
> > > RS422 
> > > > > port 
> > > > > > > when required.
> > > > > > > > 
> > > > > > > > Don't the Emax and the EII hard disk formats allocate 
a 
> > > fixed 
> > > > > > > number of banks for the disk? I believe you cannot fit 
> any 
> > > more 
> > > > > > banks 
> > > > > > > on the disk even if 
> > > > > > > > the existing banks are only half full of samples. 
> > > Presumably 
> > > > > this 
> > > > > > > is because the Emax and EII use a fixed memory size for 
> > each 
> > > > bank 
> > > > > > and 
> > > > > > > the complete 
> > > > > > > > data for the bank is copied directly between memory 
and 
> > > disk 
> > > > > when 
> > > > > > > you load or save a bank. Each hard disk bank is a the 
> > > > equivalent 
> > > > > of 
> > > > > > > one floppy disk 
> > > > > > > > image minus the OS data. I believe the Emax II and 
EIII 
> > use 
> > > > > > > variable sized banks. Therefore the number of banks 
> stored 
> > on 
> > > a 
> > > > > > hard 
> > > > > > > disk or CDROM 
> > > > > > > > depends on how much data is contained in each bank. 
But 
> I 
> > > > > believe 
> > > > > > > there is still a limit of 100 banks per disk. 
> > > > > > > > 
> > > > > > > > >
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > RS422 Communication with the Emulator was designed 
> based 
> > on 
> > > > > > > following 
> > > > > > > > key principles:
> > > > > > > > - all communication, including request/reply for 
> > parameter 
> > > > > > changes, 
> > > > > > > > occurs at 500 Kbaud
> > > > > > > > - a whole bank can be downloaded/loaded with one 
> special 
> > > > > designed 
> > > > > > > > type of command (a command which actually directly 
> > > > reads/writes 
> > > > > > the 
> > > > > > > > RAM memory segments in which the bank data is 
residing)
> > > > > > > > - bulk data load/unload occurs with data packets 
sized 
> > 256 
> > > > > bytes, 
> > > > > > > of 
> > > > > > > > which each byte represents 1 sample point (data is 
> > > > transferred 
> > > > > in 
> > > > > > > > compressed format)
> > > > > > > > 
> > > > > > > > On the Emax, they seem to have decided that choosing 
> for 
> > a 
> > > > > > > *standard* 
> > > > > > > > medium speed protocol was more important than 
choosing 
> > for 
> > > a 
> > > > > > > > *proprietary* high speed protocol. So they went for 
the 
> > > MIDI 
> > > > > > > > SYSES/MMA approach:
> > > > > > > > - all basic communication, including all 
> > > > commands/instructions, 
> > > > > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI 
> sockets 
> > > or 
> > > > > the 
> > > > > > > DB9 
> > > > > > > > RS422 port are being used.
> > > > > > > > - loading/unloading banks requires the full set of 
> SYSEX 
> > > > > > commands. 
> > > > > > > > Hence to simply download the parameters of just one 
> voice 
> > > of 
> > > > > just 
> > > > > > > one 
> > > > > > > > preset, already multiple commands must be exchanged 
> with 
> > > the 
> > > > > > Emax. 
> > > > > > > > This is due to the fact that in general only one 
> > parameter 
> > > > can 
> > > > > be 
> > > > > > > > transferred per command. And this must be done at the 
> > slow 
> > > > > 31.25 
> > > > > > > > Kbaud speed...mmmm...
> > > > > > > > - bulk data (sample) load/unload occurs with data 
> packets 
> > > > sized 
> > > > > > > only 
> > > > > > > > 120 bytes (MMA standard). Moreover each sample point 
> > > requires 
> > > > > 12 
> > > > > > > bits 
> > > > > > > > now instead of 8 bits on the EII since data is 
> > transferred 
> > > in 
> > > > > > > linear 
> > > > > > > > format instead of compressed format.
> > > > > > > > As a consequence, loading/unloading banks is much 
> slower 
> > > than 
> > > > > on 
> > > > > > > the 
> > > > > > > > EII. Of course, once they released the Emax-II, they 
> > would 
> > > > have 
> > > > > > > faced 
> > > > > > > > problems anyway. This machine could have up to 8MB 
> banks 
> > > and 
> > > > > > > doesn't 
> > > > > > > > use compression, so even at full 500 kbaud speed and 
> > using 
> > > > only 
> > > > > > one 
> > > > > > > > command - which is impossible in reality - the Emax-
II 
> > > would 
> > > > > > > require 
> > > > > > > > at least 2.7 minutes for loading/unloading banks. 
> > > Fortunately 
> > > > > > there 
> > > > > > > > was something invented called SCSI :-)
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Have a look at the MIDI spec for the Emax V3.0 
> software. 
> > > The 
> > > > > fast 
> > > > > > > (RS422) dumps use a protocol based on the MIDI SDS but 
> > > slightly 
> > > > > > > modified. The 
> > > > > > > > sample data is dumped as 12 bit linear but the 
samples 
> > are 
> > > > > packed 
> > > > > > > so that two 12 bit samples are transferred in three 8 
bit 
> > > > bytes. 
> > > > > It 
> > > > > > > is also of note that 
> > > > > > > > sending 8 bit wide data in this way violates the MIDI 
> > > > standard, 
> > > > > > as 
> > > > > > > bit7 is always reserved as an indicator of a status 
byte. 
> > Of 
> > > > > course 
> > > > > > > this is not really an 
> > > > > > > > issue here as the 500k baud RS422 data is only being 
> > > > > transferred 
> > > > > > > to/from the Emax so no other MIDI devices will ever see 
> > this 
> > > > > > > violation of the 
> > > > > > > > standard. But the outcome is that dumping samples as 
12 
> > bit 
> > > > > only 
> > > > > > > takes 50% longer than dumping as 8 bit compressed. 
Doing 
> a 
> > > > proper 
> > > > > > > MIDI SDS dump 
> > > > > > > > of 8 bit or 12 bit data actually takes the same 
amount 
> of 
> > > > time 
> > > > > as 
> > > > > > > only 7 data bits can be transferred for each byte in 
the 
> > > > message. 
> > > > > > So 
> > > > > > > an 8 bit dump 
> > > > > > > > takes two bytes per sample (7 + 1) while a 12 bit 
dump 
> > also 
> > > > > > > requires two bytes per sample (7 + 5). 16 bit dumps are 
> > even 
> > > > > slower 
> > > > > > > as they require three 
> > > > > > > > bytes per sample (7 + 7 + 2).
> > > > > > > > 
> > > > > > > > As you have said, the failure to provide a means of 
> > > directly 
> > > > > > > transferring banks into memory via RS422 seems to be 
the 
> > > > problem 
> > > > > in 
> > > > > > > the Emax, at least as 
> > > > > > > > documented in the V3.0 MIDI spec. But if the V3.0 
spec 
> > > > already 
> > > > > > > provides all the functions required to load banks from 
> the 
> > > > CDROM 
> > > > > > > drive using MIDI 
> > > > > > > > SYSEX and RS422, then why is V3.2 or the SE software 
> > > claimed 
> > > > to 
> > > > > > add 
> > > > > > > OMI CDROM support? It still seems likely to me that 
some 
> > > extra 
> > > > > > > functions were 
> > > > > > > > added in those versions to support fast bank loading 
> via 
> > > > RS422. 
> > > > > > If 
> > > > > > > not, then the OMI CDROM drive would have to be 
converting 
> > the 
> > > 8 
> > > > > bit 
> > > > > > > compressed 
> > > > > > > > sample data on the CDROM to 12 bit linear in order to 
> > dump 
> > > > the 
> > > > > > > samples into the Emax. The Emax would then have to 
> convert 
> > > the 
> > > > 12 
> > > > > > bit 
> > > > > > > linear samples 
> > > > > > > > back to compressed 8 bit samples. The transfer of 
> samples 
> > > > would 
> > > > > > > also take 50% longer for 12 bit linear compared to 8 
bit 
> > > > > > compressed. 
> > > > > > > And of course 
> > > > > > > > there would be no way for sequencer data included in 
> the 
> > > bank 
> > > > > to 
> > > > > > be 
> > > > > > > loaded into the Emax. I could be wrong, but it just 
seems 
> > > > > unlikely 
> > > > > > > Emu would have 
> > > > > > > > made it so difficult when a small software update to 
> the 
> > > Emax 
> > > > > > could 
> > > > > > > make bank dumping work in much the same way as the EII.
> > > > > > > > 
> > > > > > > > >
> > > > > > > > 
> > > > > > > > Nevertheless I will still do some experiments to find 
> out 
> > > if 
> > > > > the 
> > > > > > > Emax 
> > > > > > > > OS doesn't have any "fast bank load" commands... 
> > > > > > > > By the way: does anyone know whether the binary code 
of 
> > the 
> > > > > Emax 
> > > > > > OS 
> > > > > > > > can easily be de-compiled/disassembled in some way in 
> > order 
> > > > to 
> > > > > > get 
> > > > > > > > some kind of source code ? Is a simple Z80 
disassembler 
> > > > > > sufficient ?
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Unfortunately it seems the only way is to experiment 
> and 
> > > see 
> > > > > what 
> > > > > > > can be uncovered. The Emax NS32000 main CPU code can be 
> > > > > > disassembled 
> > > > > > > but it is 
> > > > > > > > not a common processor. The hard part of analyzing 
the 
> > > > > > disassembled 
> > > > > > > code is working out where the program and data begins 
and 
> > > ends 
> > > > as 
> > > > > > > well as what 
> > > > > > > > interrupt routines are being handled at runtime and 
how 
> > > they 
> > > > > > > interact. You would need to combine together the code 
> from 
> > > the 
> > > > > disk 
> > > > > > > OS image and the 
> > > > > > > > EPROM into a processor memory map. Various hardware 
> > > > peripherals 
> > > > > > > will also probably exist at certain addresses in the 
> memory 
> > > > map. 
> > > > > To 
> > > > > > > pull it all 
> > > > > > > > together you will ideally have the circuit 
schematics, 
> > the 
> > > > > memory 
> > > > > > > map, CPU/chip documentation plus a detailed design 
> > > description 
> > > > of 
> > > > > > how 
> > > > > > > the system 
> > > > > > > > works. Often much of this data can be found in the 
> > product 
> > > > > > service 
> > > > > > > manual. Then you need to determine which routines are 
> > called 
> > > > when 
> > > > > > > MIDI/RS422 
> > > > > > > > interrupts are handled. Testing with a logic analyzer 
> > > probing 
> > > > > the 
> > > > > > > CPU would certainly make that easier.
> > > > > > > > 
> > > > > > > > /Tristan
> > > > > > > > 
> > > > > > > > >
> > > > > > > > 
> > > > > > > > 
> > > > > > > > ///E-Synthesist 
> > > > > > > > 
> > > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > > > > >
> > > > > > > > > That seems excessively slow, as the EII could load 
a 
> > > > similar 
> > > > > > > sized 
> > > > > > > > bank from the same CDROM 
> > > > > > > > > drive in 12 seconds. Its hard to imagine Emu would 
> not 
> > > have 
> > > > > > > > implemented a similar load time on 
> > > > > > > > > the Emax if all it took was adding a software 
> routine. 
> > > But 
> > > > > then 
> > > > > > > > again, stranger things have 
> > > > > > > > > happened...
> > > > > > > > > 
> > > > > > > > > /Tristan
> > > > > > > > > 
> > > > > > > > > Quoting John Silveria II <john@>:
> > > > > > > > > 
> > > > > > > > > > Somewhere, and I can't remember where, I read 
that 
Show quoted textHide quoted text
> > the 
> > > CD-
> > > > > Rom 
> > > > > > > > drive
> > > > > > > > > > took 
> > > > > > > > > > up to 5 minutes to load a bank. I wish I could 
> > remember 
> > > > > > where. 
> > > > > > > So
> > > > > > > > > > indeed 
> > > > > > > > > > it was not only as slow as typical SYSEX load, it 
> > could 
> > > > > > > actually 
> > > > > > > > take
> > > > > > > > > > 
> > > > > > > > > > longer.
> > > > > > > > > >
> > > >
> > >
> >
>

Re: [emax] Re: RS422 fun

2008-11-22 by Ted Summers

From the emax service manual.....


This paragraph to me indicates a Synchronous clock at 500Khz. What I  
can see from the schematic is that the signal from pin 7 connects to  
the 9638 pin 6. The 9638 pin 6 is an output signal confirmed from the  
parts datasheet. So the Emax is supplying the clock to the host  
computer for timing.

So what you are saying is that none of these RS422 ports or converters  
have a clock line input?

Do you have any links to the documentation for these RS422 devices  
that we can review or are there any schematics for them or are you  
able to determine any IC's used in them we could look at the  
datasheets for?

Regards,
Ted


On Nov 22, 2008, at 9:14 AM, esynthesist wrote:

OK. If I was able to connect the clock of the Emax with the RS422
port I would have done so from the very beginning of course :-)

But that's the whole problem: I haven't found a new PC RS422 port yet
which is capable of being externally clocked. Also the specs provided
on many vendor's websites are pretty vague.
Perhaps some high end RS422 automation ports can be clocked, but
these devices tend to be quite expensive (and still seem not to have
this feature; the higher price is due to additional protection,
better hardcases, breakout boxes, multiple ports, etc).

So: if anyone knows where to buy an affordable RS422 port (USB or PC
Card/Express Card) which is externally clockable, I love to hear it !!

(Note: as far as I know the EII has the same serial communication
setup as the Emax. Does this mean that the statement in the Emu
document saying that the RS422 communication is "asynchronous" is a
type/wrong ?)

///E-Synthesist

--- In emax@yahoogroups.com, tu@... wrote:
 >
 > Ok, this explains why you are seeing errors in the data coming from
the PC but not with data going to the PC. You are running the PC
RS422 interfaces
 > asynchronously when they need to synchronous with the Emax clock.
Your cable also does not have the 500kHz clock from the Emax
connected!
 >
 > When your PC RS422 interface is set to 500k baud with its internal
clock the PC RS422 interface can receive the data from the Emax
perfectly because
 > the data is transmitted in the same format as a standard
asynchronous UART transmission. However, the 6850 UART in the Emax is
running in x1
 > synchronous mode, where it needs one correctly aligned clock pulse
for each start, stop and data bit received. As the Emax UART RX clock
is fed from
 > the same 500kHz clock that appears on its RS422 port, the received
data needs to be properly synchronized with that clock edge.
 >
 > With your currect interfaces the PC UART will be happily
transmitting data in sync with its internal clock but the
asynchronous bit transitions will not
 > always be in sync with the Emax 500kHz clock. Because of this the
Emax will sometimes appear to work correctly but then the clock to
data relationship
 > will drift and there will be corruption in the received data.
 >
 > The best solution for this would be to get another RS422 card that
allows operation from an external clock in x1 mode. The 500kHz x1
UART clock is
 > transmitted from pin 7 of the Emax RS422 connector and needs to be
connected to the PC RS422 external clock input. Note that the CTS/RTS
pins on
 > serial ports are for hardware handshaking and not normally used as
clock inputs. The Mac serial interface uses its HSKi pin as its
external clock input
 > but how this is implemented in another RS422 may be different.
 >
 > /Tristan
 >
 > Saturday, November 22, 2008, 9:03:23 PM, you wrote:
 >
 > >
 > About the hardware I have used until now:
 >
 > Serial ports:
 > - Meilhaus Redcom USB-COMI RS422 USB port. Also sold with other
brand
 > names such as Easysync; very popular one. --> This is the one I
have
 > best results with. Internal clockable at 500kbaud.
 > - Moxa Uport 1150 RS422/RS232 USB port. This device does not
support
 > RTS/CTS handshaking for RS422 and is not internally clockable at
500
 > kbaud. So it's useless :-)
 > - Exsys EX-1362 double RS422 PCMCIA card. This one has the same
 > features as the Meilhaus but the results where less reliable.
 > - Ednet RS232 USB adapter 84204. A cheap RS232 device, just to see
if
 > this wouldn't work. It didn't.
 >
 > Cable/wiring:
 > Until now I only used the GND and DATA signals, so I connected 5
pins
 > of the Emax/Emulator II to the PC RS422 as follows:
 > - Emax PIN 3 (GND) to RS422 PIN 5 (GND)
 > - Emax PIN 4 (RXD+) to RS422 PIN 2 (TXD+)
 > - Emax PIN 5 (RXD-) to RS422 PIN 1 (TXD-)
 > - Emax PIN 8 (TXD+) to RS422 PIN 3 (RXD+)
 > - Emax PIN 9 (TXD-) to RS422 PIN 4 (RXD-)
 > The cable is a 10-wire shielded cable of 1.5 meters long.
 >
 > (I already spent 300 EUR on serial devices, so I'm not planning to
 > buy additional ones anymore :-)
 >
 > Final note: before I started this project with the EII/Emax, I had
 > never programmed/monitored a serial device before, so let's say
that
 > my hardware/RS422 experience is low but increasing ...
 >
 > ///E-Synthesist
 >
 > --- In emax@yahoogroups.com, tu@ wrote:
 > >
 > > I think the solution here really depends on the actual cause of
the
 > problem. It may even be just some simple thing like the cable
wiring
 > or a driver
 > > setting for the PC RS422 hardware. It would be helpful if you
could
 > provide some more detail on the hardware you are using. For a
start,
 > the exact
 > > brand and model number of the RS422 interfaces and cables plus
the
 > wiring diagrams of the cables.
 > >
 > > The best case would be if you could get an existing PC RS422
 > interface to work with the Emax with no hardware modification.
 > Otherwise the solutions
 > > start to get more complicated, such as modifying circuits,
building
 > an interface board or even having a microcontroller sitting between
 > the PC and the
 > > Emax doing protocol translation. But now you have the Emax
 > protocols worked out I believe a solution can be achieved.
 > >
 > > If you don't have the tools to measure what is going on in the
 > interface circuits then you will have difficulty sorting this out.
I
 > would suggest using a
 > > digital oscilloscope to measure the TX and RX data signals plus
the
 > 500kHz clock at the Emax 6850 UART chip when the Emax is actually
 > communicating
 > > with both the Mac and the PC. You will need at least two
 > oscilloscope channels to see the clock and the data simultaneously.
 > More channels would be
 > > nice, but the TX data and clock together and RX data and clock
 > together are the first things to look at. You could also use a
logic
 > analyzer but I think an
 > > oscilloscope is better because it will show the actual waveforms,
 > not just the logic transitions.
 > >
 > > Unfortunately the Emax and Mac RS422 interfaces are products of
 > their times, and times move on. No doubt it was a reasonable
decision
 > to implement
 > > the interface to the host computer this way back in the 1980s.
 > >
 > > The sysex timeout is related to the dumping protocol and has no
 > real bearing on what happens with the clocking at the data tranfer
 > layer. But you could
 > > always experiment with it to see if it makes any difference to
the
 > problem you are seeing. At this stage we do not know for sure that
 > the problem is at
 > > the low level.
 > >
 > > I am not sure how much experience you have with hardware and
 > communications troubleshooting but I am happy to help or provide
 > further if you
 > > would like to pursue this. As I said in a previous email, I would
 > like to see a general solution that would allow any of the Emu
RS422
 > equipped samplers
 > > to be connected to a modern PC for sample dumping and/or bank
 > transfer (where applicable). You have done fabulous work with the
 > EMXP program and
 > > seem to have the software and Emu formats and protocols worked
out.
 > So I think getting this happening should not be too hard :)
 > >
 > > /Tristan
 > >
 > > Saturday, November 22, 2008, 12:00:21 AM, you wrote:
 > >
 > > >
 > > Thanks Tristan.
 > >
 > > I'm wondering though: even if we find the actual cause of the
 > problem
 > > (timing or signal level), I guess there's not much we can do to
 > solve
 > > the problem. Besides making a custom communication board of
course.
 > > Because I don't think characteristics such as "clock to data
 > > relationship" can be configured on any normal commercial RS422
port
 > > device for PCs, right ?
 > > That's in fact the only reason why I didn't invest in a scope
yet:
 > > exactly knowing the problem would be nice, but not being able to
 > > solve it would be frustrating :-)
 > > Man ! I would love the standard PC RS422 ports to be externally
 > > clockable ! Why is this (once again) one of those "Mac"-only
 > > features !
 > >
 > > Question: the RS422 communication "timeout period" on the Emax
can
 > be
 > > configured with a SYSEX command (from 1 to 127 seconds). But I
 > guess
 > > this is not something that can help on the lowel level data
 > > syncronization problem we are dealing with here, right ? I
 > > guess "our" problem is more related to the speed at which a
stream
 > of
 > > bits (as a whole) is entering the Emax port ?
 > >
 > > ///E-Synthesist
 > >
 > > --- In emax@yahoogroups.com, tu@ wrote:
 > > >
 > > > Yes, an oscilloscope is what you need. I suggest getting a
 > digital
 > > model as it should allow you to capture and store the signals you
 > are
 > > measuring. Some
 > > > high end multimeters also have oscilloscope functions, but
check
 > > the bandwidth is well above the highest frequencies you will need
 > to
 > > measure. An audio
 > > > card is not suitable for this task.
 > > >
 > > > I did a search on the Mac serial port and it seems that while
the
 > > output voltage levels are slightly non standard they should not
 > > present any problems for
 > > > the Emax 9637 RS422 receiver chip. I only have the Emax II
 > > schematics but I believe the RS422 interface should be the same
as
 > > the Emax. The 9637
 > > > circuit doesn't appear to have any EMI supression or
termination
 > > other than a pullup to +5V on the noninverting input. So the Emax
 > is
 > > relying on the
 > > > sending circuit to ensure a reasonably clean signal arrives.
The
 > > Mac has an EMI filter on its RS422 port but I am not sure what
your
 > > PC RS422 port may
 > > > have.
 > > >
 > > > Another thing to look at is the relationship between the 500kHz
 > > clock the Emax sends out and the data that is sent back to the
Emax
 > > from the PC. The
 > > > 6850 UART in the Emax relies on a this being within a certain
 > > timing range. If the clock to data relationship from the PC RS422
 > > port is not the same as
 > > > from the Mac then this could cause problems. The same would
also
 > > occur if the PC RS422 transmit clock is drifting because is not
 > > locked to the same
 > > > clock that it is receiving from the Emax. Of course the data
 > being
 > > sent from the Emax to the PC will be ok because the clock and
data
 > > are transmitted
 > > > together with the correct timing relationship.
 > > >
 > > > /Tristan
 > > >
 > > > Tuesday, November 18, 2008, 3:58:48 AM, you wrote:
 > > >
 > > > >
 > > > To have 100% certainty about the actual problem I should indeed
 > do
 > > > some measurements with an oscilloscope... but I don't have one.
 > > > I was (and still) am thinking about buying one, either analog
or
 > > > digital. Until now I only did some measurements with an
external
 > > > audio card acting as a wave recorder, but its sampling
frequency
 > > and
 > > > bandwith are - of course - insufficient to do proper
measurements
 > > on
 > > > 500kbaud signals. What I do see however - even with this
method -
 > > is
 > > > that the amplitude level of the Mac signal is much higher than
 > the
 > > PC
 > > > signal.
 > > > On the other hand, if the RS422 of the Emax is standard, then I
 > > > shouldn't have any problem. Mmmm...
 > > > Yes, the best solution would consist of a custom RS422 port for
 > the
 > > > PC which can even be externally clocked. But I'm not an
 > electronics
 > > > specialist so it will take a looooonnnnng time before I will
end
 > up
 > > > with a working set :-)
 > > >
 > > > ///E-Synthesist
 > > >
 > > > --- In emax@yahoogroups.com, tu@ wrote:
 > > > >
 > > > > I am not sure about the Mac circuitry but the RS422 interface
 > on
 > > > the Emax should just be standard
 > > > > 9637 and 9638 RS422 buffers. The input threshold on the 9637
 > > > receiver is specified to be +/-
 > > > > 200mV so it should work with voltages higher than that. Do
you
 > > have
 > > > an oscilloscope that you can
 > > > > use to probe the 9637 while it is receiving data? If so, you
 > > could
 > > > compare when receiving data
 > > > > from the Mac and the PC via RS422.
 > > > >
 > > > > Its not a priority, but I think it would be worthwhile to
have
 > an
 > > > RS422 interface that would allow
 > > > > any PC to be used for sample dumping to the Emax I, Emax II,
 > EII,
 > > > EIII and EIIIx as well as bank
 > > > > transfer with the EII and Emax. Even if an interface box cost
 > > some
 > > > money I feel there would be a
 > > > > demand given the numbers of these samplers still in use. The
 > Emu
 > > > world cannot live on old Macs
 > > > > alone :)
 > > > >
 > > > > /Tristan
 > > > >
 > > > > Monday, November 17, 2008, 3:24:57 AM, you wrote:
 > > > >
 > > > > >
 > > > > After some additional testing I'm pretty sure the problems
are
 > > not
 > > > > caused by timing differences, but by voltage levels.
 > > > > I received a PCMCIA RS422 port this week, and this thing has
 > even
 > > > > more problems with communicating with the EII and the Emax
than
 > > my
 > > > > USB/RS422 converter device. And again the communication
problem
 > > is
 > > > to
 > > > > be found in the PC->Emax transmit part, not in the receive
part.
 > > > > I mentioned before that the Mac RS422 is sending very high
 > signal
 > > > > levels (higher than "officially" allowed by the RS422
 > standard).
 > > > The
 > > > > Emu samplers seem to rely on these high signals.
 > > > > Conclusion: I give up the current experiments. Perhaps some
 > time
 > > in
 > > > > the future I'll try to make a device based on Mac circuits...
 > > > >
 > > > > --- In emax@yahoogroups.com, tu@ wrote:
 > > > > >
 > > > > > Ok, that is interesting.
 > > > > >
 > > > > > An alternative to direct connection of the RS422 to the PC
 > > would
 > > > be
 > > > > a microcontroller sitting
 > > > > > between the PC and sampler. I think someone suggested that
 > > > before.
 > > > > It could respond to the
 > > > > > sampler with tight timing but handle the loose timing over
 > the
 > > PC
 > > > > connection. I guess the PC side
 > > > > > could be implemented with either RS-232 or USB. But
obviously
 > > USB
 > > > > would require a lot more
 > > > > > coding than simply translating RS422 and RS232 port
protocols
 > > > with
 > > > > a bit of buffering in between.
 > > > > >
 > > > > > /Tristan
 > > > > >
 > > > > > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
 > > > > >
 > > > > > >
 > > > > > Yes it's about the same concept as on the EII: taking an
 > exact
 > > > dump
 > > > > > of the internal Emax memory at 500 kbaud in both
directions.
 > Or
 > > > in
 > > > > > other words... transferring an EMX file across the serial
 > line
 > > > > > (except for the EMX 39 byte header string of course).
 > > > > >
 > > > > > But there are two major drawbacks compared with the EII:
 > > > > > 1/ the Emax uses the MMA standard to accomplish this dump,
 > > > meaning
 > > > > > that the data is sent in packets of 120 bytes instead of
256
 > > > bytes,
 > > > > > which is slower.
 > > > > > 2/ it's not possible to dump specific memory segments, the
 > > whole
 > > > > > thing must be dumped in one sequential loop from the very
 > > > beginning
 > > > > > (position 0) to the very end (position 552959).
 > > > > >
 > > > > > The second one is a BIG problem: it means that if something
 > > goes
 > > > > > wrong (like a bad packet) the whole dump must be restarted.
 > > > > > And... since the PC RS422 communication line with the Emax
is
 > > not
 > > > > > optimal, this kind of error will for sure occur during a
bank
 > > > > > transfer. On the EII, this means simply re-asking for the
 > > > > particular
 > > > > > bad data packet, but on the Emax you have to start all over
 > > again.
 > > > > >
 > > > > > In practice this means that a full load/unload is simply
not
 > > > > possible
 > > > > > with my current hardware (USB-RS422 and USB-RS232
converters
 > of
 > > > all
 > > > > > kinds) because the loop is restarted endlessly. At the end
of
 > > the
 > > > > > week I'll try an non-USB port device, I hope that one will
 > work.
 > > > > > If not, a custom RS422 PC port must be built for the
 > Emax/EII,
 > > > > based
 > > > > > on the RS422 circuits & ICs of the Mac.
 > > > > >
 > > > > > ///E-Synthesist
 > > > > >
 > > > > > --- In emax@yahoogroups.com, tu@ wrote:
 > > > > > >
 > > > > > > Fantastic! So, is it the same method that the EII uses
for
 > > bank
 > > > > > transfer or something else? Is there
 > > > > > > any chance you could document the protocol?
 > > > > > >
 > > > > > > I think 25-30 seconds should be acceptable for Emax I
bank
 > > > loads.
 > > > > > At least it provides an option
 > > > > > > for those who can't or don't want to add SCSI.
 > > > > > >
 > > > > > > The Emax II load time does sound a bit slow. But it might
 > > still
 > > > > be
 > > > > > of use if someone had a working
 > > > > > > Emax II with a dead SCSI chip.
 > > > > > >
 > > > > > > Out of interest, can the Emax II directly load an Emax I
 > bank
 > > > > (with
 > > > > > compressed 8 bit samples) in
 > > > > > > this way?
 > > > > > >
 > > > > > > /Tristan
 > > > > > >
 > > > > > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
 > > > > > >
 > > > > > > >
 > > > > > > After some experiments during the weekend, the current
 > status
 > > > of
 > > > > my
 > > > > > > little RS422 project is that I know how to do *fast* bank
 > > > > > > loads/unloads on the Emax via RS422.
 > > > > > > This should reduce the total data transfer time to 25-30
 > > > seconds
 > > > > on
 > > > > > > the Emax-I instead of the 2-3 minutes of Alchemy. Most
 > > probably
 > > > > > this
 > > > > > > was also the total load time of the OMI CDS3 system,
which
 > > is -
 > > > > > let's
 > > > > > > say - "acceptable"...
 > > > > > > That's about the same speed as loading from a floppy :-)
 > but
 > > > the
 > > > > > > biggest advantage would be that one would have immediate
 > > access
 > > > > to
 > > > > > > hundreds of banks on the PC harddrive instead of having
to
 > > copy
 > > > > > > individual banks to floppy disks first...
 > > > > > > Still SCSI is a much better alternative... for those
having
 > a
 > > > > rev2
 > > > > > or
 > > > > > > rev3 board, and for those using the Emax-II. BTW at RS422
 > > > speed,
 > > > > > the
 > > > > > > data transfer time on a fully loaded Emax-II Turbo 8M
would
 > > be
 > > > > > about
 > > > > > > 7 minutes :-). Fortunately every Emax-II is equipped with
 > > SCSI.
 > > > > > >
 > > > > > > I have to write some decent software now which supports
the
 > > > full
 > > > > > Emax
 > > > > > > handshaking protocol. But I'm pretty sure that the USB<--
 > > >RS422
 > > > > > > converters will not be the best solution for this
 > > > communication -
 > > > > > > just like with the EII the communication seems to be
quite
 > > > > > unreliable
 > > > > > > when transmitting data from the PC to the Emax, as a
 > > > consequence
 > > > > > the
 > > > > > > total transfer time increases dramatically due to
 > handshaking
 > > > > > > overhead.
 > > > > > > At the end of the week I will have a PCCard RS422 port on
 > my
 > > > > > laptop.
 > > > > > > This piece of hardware does not suffer from USB latency,
so
 > I
 > > > > hope
 > > > > > it
 > > > > > > will work better...
 > > > > > >
 > > > > > > ///E-Synthesist
 > > > > > >
 > > > > > > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@>
 > > wrote:
 > > > > > > >
 > > > > > > > Yes, I was also thinking there must be some dedicated
 > > command
 > > > > > (set)
 > > > > > > > for fast load/unload. But the fact that John remembered
a
 > > > load
 > > > > > time
 > > > > > > > of 5 minutes for the OMI cdroms made me doubt again...
On
 > > the
 > > > > > other
 > > > > > > > hand it is true that OMI cdroms could only be used
after
 > > the
 > > > > > > release
 > > > > > > > of OS 3.2, so this is indeed an indication that
 > additional
 > > > > > commands
 > > > > > > > have been added, or at least some changes have been
 > > applied.
 > > > I
 > > > > > also
 > > > > > > > observed that the v 3.2 MIDI protocol is not 100%
 > behaving
 > > as
 > > > > > > > described in the v 3.0 document, e.g. the timeout
 > handling
 > > is
 > > > > > > > different. So there are also changes in the 'normal'
 > > > SYSEX/MMA
 > > > > > > > protocol.
 > > > > > > > By the way: the OMI drive also required a firmware
update
 > > in
 > > > > > order
 > > > > > > to
 > > > > > > > be compatible with the Emax. Question is of course
 > whether
 > > > this
 > > > > > was
 > > > > > > > just a small firmware update (to support the newly
added
 > > > > commands
 > > > > > > in
 > > > > > > > the Emax OS) or a huge piece of Emax-specific code (to
 > > > > implement
 > > > > > > the
 > > > > > > > full SYSEX/MMA command set - which is indeed quite
 > > > unlikely) ...
 > > > > > > >
 > > > > > > > The Emax-II and EIII indeed have a filesystem which is
 > > > > optimized
 > > > > > > for
 > > > > > > > handling different banksizes; I have the specs here
 > because
 > > I
 > > > > > > needed
 > > > > > > > them for EMXP. The EII and Emax are using filesystems
 > with
 > > > > fixed
 > > > > > > > filesizes in a sequential order.
 > > > > > > >
 > > > > > > > Since I don't have any Emax OMI cdrom disk I'm not even
 > > sure
 > > > > > > whether
 > > > > > > > the banks on these disks are "EMX-like" 8-bit images or
 > > > > expanded
 > > > > > 12
 > > > > > > > bit images. It makes sense that they are 8-bit, because
 > > this
 > > > > > > allowed
 > > > > > > > OMI to put more banks on a CD, to transfer them faster
to
 > > the
 > > > > > Emax
 > > > > > > > (if EII-like commands have been implemented in the Emax
 > OS
 > > of
 > > > > > > course)
 > > > > > > > and to use the same bank layout as on the Emax floppy
and
 > > > Emax
 > > > > > > > harddisk banks.
 > > > > > > >
 > > > > > > > So despite the "5 minutes load time" note from John, I
 > > think
 > > > we
 > > > > > can
 > > > > > > > still assume that there is some specific command set in
 > > V3.2
 > > > > > which
 > > > > > > > enables fast bank loads. I will try to find them out
 > during
 > > > the
 > > > > > > > weekend, either by experimenting or by looking into the
 > OS
 > > > > > > > binary/disassembled code...
 > > > > > > >
 > > > > > > > ///E-Synthesist
 > > > > > > >
 > > > > > > >
 > > > > > > >
 > > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
 > > > > > > > >
 > > > > > > > >
 > > > > > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
 > > > > > > > >
 > > > > > > > > >
 > > > > > > > > But the 5 minutes load time may have been reality...
 > > > > > > > >
 > > > > > > > > This can explain why I don't know anyone and find no
 > > > > reference
 > > > > > at
 > > > > > > > all
 > > > > > > > > of anyone who actually used this CD-ROM drive with
the
 > > > Emax.
 > > > > If
 > > > > > > > this
 > > > > > > > > 5 minutes load time is true, this must have resulted
in
 > a
 > > > > > > > commercial
 > > > > > > > > failure for OMI when they launched the Emax OMI cd
 > > disks...
 > > > > but
 > > > > > > > they
 > > > > > > > > probably released these disks also in Mac/SD format ?
 > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > > Yes, such a slow load time would have been a major
 > > > marketing
 > > > > > > > problem. I find it difficult to imagine that Emu would
 > not
 > > > have
 > > > > > > added
 > > > > > > > the small amount of
 > > > > > > > > extra code required to load in a bank quickly via
 > RS422.
 > > If
 > > > > > they
 > > > > > > > wanted to sell Emaxes then surely there was a strong
 > > > incentive
 > > > > to
 > > > > > > > make the sound
 > > > > > > > > library efficient to use. I suspect the OMI CDROM
 > system
 > > > for
 > > > > > the
 > > > > > > > Emax was not a major market success because of the
cost.
 > > The
 > > > > OMI
 > > > > > > > CDROM drive, or
 > > > > > > > > even a Mac with a CDROM drive, would have cost a
 > > > significant
 > > > > > > > proportion of the cost of an Emax. The average musician
 > > > > probably
 > > > > > > > would not have been
 > > > > > > > > able to justify that additional expense. Particularly
 > so
 > > > > given
 > > > > > > that
 > > > > > > > early CDROM drives were rather fragile.
 > > > > > > > >
 > > > > > > > > >
 > > > > > > > >
 > > > > > > > > And yes, Emu has done strange things. E.g. the EII
 > cdrom
 > > > kit
 > > > > > > > > supported a "folder" or "category" system: the banks
on
 > a
 > > > > disk
 > > > > > > > could
 > > > > > > > > be put in folders (like bank "piano" in
 > folder "acoustic
 > > > > > > > keyboards")
 > > > > > > > > to make navigation much easier. This feature was not
 > > > > available
 > > > > > on
 > > > > > > > the
 > > > > > > > > Emax and EIII harddisks. Maybe Emu considered this to
 > be
 > > a
 > > > > > > feature
 > > > > > > > of
 > > > > > > > > OMI and not of Emu themselves, but they could have
 > > learned
 > > > > from
 > > > > > > > > that...
 > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > > Surely the category organisation was only a feature
of
 > > the
 > > > > OMI
 > > > > > > > CDROM system, as the EII had no control over it. So it
 > was
 > > > > OMI's
 > > > > > > > CDROM format, not
 > > > > > > > > Emu's format. But this also gave OMI the flexibility
to
 > > put
 > > > > as
 > > > > > > many
 > > > > > > > banks on the disk as they wanted and to organise them
as
 > > they
 > > > > > > wanted.
 > > > > > > > There was
 > > > > > > > > no restriction on how OMI could do this as long as
they
 > > > could
 > > > > > > serve
 > > > > > > > up the full memory image of each bank to the EII via
the
 > > > RS422
 > > > > > port
 > > > > > > > when required.
 > > > > > > > >
 > > > > > > > > Don't the Emax and the EII hard disk formats allocate
a
 > > > fixed
 > > > > > > > number of banks for the disk? I believe you cannot fit
 > any
 > > > more
 > > > > > > banks
 > > > > > > > on the disk even if
 > > > > > > > > the existing banks are only half full of samples.
 > > > Presumably
 > > > > > this
 > > > > > > > is because the Emax and EII use a fixed memory size for
 > > each
 > > > > bank
 > > > > > > and
 > > > > > > > the complete
 > > > > > > > > data for the bank is copied directly between memory
and
 > > > disk
 > > > > > when
 > > > > > > > you load or save a bank. Each hard disk bank is a the
 > > > > equivalent
 > > > > > of
 > > > > > > > one floppy disk
 > > > > > > > > image minus the OS data. I believe the Emax II and
EIII
 > > use
 > > > > > > > variable sized banks. Therefore the number of banks
 > stored
 > > on
 > > > a
 > > > > > > hard
 > > > > > > > disk or CDROM
 > > > > > > > > depends on how much data is contained in each bank.
But
 > I
 > > > > > believe
 > > > > > > > there is still a limit of 100 banks per disk.
 > > > > > > > >
 > > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > > RS422 Communication with the Emulator was designed
 > based
 > > on
 > > > > > > > following
 > > > > > > > > key principles:
 > > > > > > > > - all communication, including request/reply for
 > > parameter
 > > > > > > changes,
 > > > > > > > > occurs at 500 Kbaud
 > > > > > > > > - a whole bank can be downloaded/loaded with one
 > special
 > > > > > designed
 > > > > > > > > type of command (a command which actually directly
 > > > > reads/writes
 > > > > > > the
 > > > > > > > > RAM memory segments in which the bank data is
residing)
 > > > > > > > > - bulk data load/unload occurs with data packets
sized
 > > 256
 > > > > > bytes,
 > > > > > > > of
 > > > > > > > > which each byte represents 1 sample point (data is
 > > > > transferred
 > > > > > in
 > > > > > > > > compressed format)
 > > > > > > > >
 > > > > > > > > On the Emax, they seem to have decided that choosing
 > for
 > > a
 > > > > > > > *standard*
 > > > > > > > > medium speed protocol was more important than
choosing
 > > for
 > > > a
 > > > > > > > > *proprietary* high speed protocol. So they went for
the
 > > > MIDI
 > > > > > > > > SYSES/MMA approach:
 > > > > > > > > - all basic communication, including all
 > > > > commands/instructions,
 > > > > > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI
 > sockets
 > > > or
 > > > > > the
 > > > > > > > DB9
 > > > > > > > > RS422 port are being used.
 > > > > > > > > - loading/unloading banks requires the full set of
 > SYSEX
 > > > > > > commands.
 > > > > > > > > Hence to simply download the parameters of just one
 > voice
 > > > of
 > > > > > just
 > > > > > > > one
 > > > > > > > > preset, already multiple commands must be exchanged
 > with
 > > > the
 > > > > > > Emax.
 > > > > > > > > This is due to the fact that in general only one
 > > parameter
 > > > > can
 > > > > > be
 > > > > > > > > transferred per command. And this must be done at the
 > > slow
 > > > > > 31.25
 > > > > > > > > Kbaud speed...mmmm...
 > > > > > > > > - bulk data (sample) load/unload occurs with data
 > packets
 > > > > sized
 > > > > > > > only
 > > > > > > > > 120 bytes (MMA standard). Moreover each sample point
 > > > requires
 > > > > > 12
 > > > > > > > bits
 > > > > > > > > now instead of 8 bits on the EII since data is
 > > transferred
 > > > in
 > > > > > > > linear
 > > > > > > > > format instead of compressed format.
 > > > > > > > > As a consequence, loading/unloading banks is much
 > slower
 > > > than
 > > > > > on
 > > > > > > > the
 > > > > > > > > EII. Of course, once they released the Emax-II, they
 > > would
 > > > > have
 > > > > > > > faced
 > > > > > > > > problems anyway. This machine could have up to 8MB
 > banks
 > > > and
 > > > > > > > doesn't
 > > > > > > > > use compression, so even at full 500 kbaud speed and
 > > using
 > > > > only
 > > > > > > one
 > > > > > > > > command - which is impossible in reality - the Emax-
II
 > > > would
 > > > > > > > require
 > > > > > > > > at least 2.7 minutes for loading/unloading banks.
 > > > Fortunately
 > > > > > > there
 > > > > > > > > was something invented called SCSI :-)
 > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > > Have a look at the MIDI spec for the Emax V3.0
 > software.
 > > > The
 > > > > > fast
 > > > > > > > (RS422) dumps use a protocol based on the MIDI SDS but
 > > > slightly
 > > > > > > > modified. The
 > > > > > > > > sample data is dumped as 12 bit linear but the
samples
 > > are
 > > > > > packed
 > > > > > > > so that two 12 bit samples are transferred in three 8
bit
 > > > > bytes.
 > > > > > It
 > > > > > > > is also of note that
 > > > > > > > > sending 8 bit wide data in this way violates the MIDI
 > > > > standard,
 > > > > > > as
 > > > > > > > bit7 is always reserved as an indicator of a status
byte.
 > > Of
 > > > > > course
 > > > > > > > this is not really an
 > > > > > > > > issue here as the 500k baud RS422 data is only being
 > > > > > transferred
 > > > > > > > to/from the Emax so no other MIDI devices will ever see
 > > this
 > > > > > > > violation of the
 > > > > > > > > standard. But the outcome is that dumping samples as
12
 > > bit
 > > > > > only
 > > > > > > > takes 50% longer than dumping as 8 bit compressed.
Doing
 > a
 > > > > proper
 > > > > > > > MIDI SDS dump
 > > > > > > > > of 8 bit or 12 bit data actually takes the same
amount
 > of
 > > > > time
 > > > > > as
 > > > > > > > only 7 data bits can be transferred for each byte in
the
 > > > > message.
 > > > > > > So
 > > > > > > > an 8 bit dump
 > > > > > > > > takes two bytes per sample (7 + 1) while a 12 bit
dump
 > > also
 > > > > > > > requires two bytes per sample (7 + 5). 16 bit dumps are
 > > even
 > > > > > slower
 > > > > > > > as they require three
 > > > > > > > > bytes per sample (7 + 7 + 2).
 > > > > > > > >
 > > > > > > > > As you have said, the failure to provide a means of
 > > > directly
 > > > > > > > transferring banks into memory via RS422 seems to be
the
 > > > > problem
 > > > > > in
 > > > > > > > the Emax, at least as
 > > > > > > > > documented in the V3.0 MIDI spec. But if the V3.0
spec
 > > > > already
 > > > > > > > provides all the functions required to load banks from
 > the
 > > > > CDROM
 > > > > > > > drive using MIDI
 > > > > > > > > SYSEX and RS422, then why is V3.2 or the SE software
 > > > claimed
 > > > > to
 > > > > > > add
 > > > > > > > OMI CDROM support? It still seems likely to me that
some
 > > > extra
 > > > > > > > functions were
 > > > > > > > > added in those versions to support fast bank loading
 > via
 > > > > RS422.
 > > > > > > If
 > > > > > > > not, then the OMI CDROM drive would have to be
converting
 > > the
 > > > 8
 > > > > > bit
 > > > > > > > compressed
 > > > > > > > > sample data on the CDROM to 12 bit linear in order to
 > > dump
 > > > > the
 > > > > > > > samples into the Emax. The Emax would then have to
 > convert
 > > > the
 > > > > 12
 > > > > > > bit
 > > > > > > > linear samples
 > > > > > > > > back to compressed 8 bit samples. The transfer of
 > samples
 > > > > would
 > > > > > > > also take 50% longer for 12 bit linear compared to 8
bit
 > > > > > > compressed.
 > > > > > > > And of course
 > > > > > > > > there would be no way for sequencer data included in
 > the
 > > > bank
 > > > > > to
 > > > > > > be
 > > > > > > > loaded into the Emax. I could be wrong, but it just
seems
 > > > > > unlikely
 > > > > > > > Emu would have
 > > > > > > > > made it so difficult when a small software update to
 > the
 > > > Emax
 > > > > > > could
 > > > > > > > make bank dumping work in much the same way as the EII.
 > > > > > > > >
 > > > > > > > > >
 > > > > > > > >
 > > > > > > > > Nevertheless I will still do some experiments to find
 > out
 > > > if
 > > > > > the
 > > > > > > > Emax
 > > > > > > > > OS doesn't have any "fast bank load" commands...
 > > > > > > > > By the way: does anyone know whether the binary code
of
 > > the
 > > > > > Emax
 > > > > > > OS
 > > > > > > > > can easily be de-compiled/disassembled in some way in
 > > order
 > > > > to
 > > > > > > get
 > > > > > > > > some kind of source code ? Is a simple Z80
disassembler
 > > > > > > sufficient ?
 > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > > Unfortunately it seems the only way is to experiment
 > and
 > > > see
 > > > > > what
 > > > > > > > can be uncovered. The Emax NS32000 main CPU code can be
 > > > > > > disassembled
 > > > > > > > but it is
 > > > > > > > > not a common processor. The hard part of analyzing
the
 > > > > > > disassembled
 > > > > > > > code is working out where the program and data begins
and
 > > > ends
 > > > > as
 > > > > > > > well as what
 > > > > > > > > interrupt routines are being handled at runtime and
how
 > > > they
 > > > > > > > interact. You would need to combine together the code
 > from
 > > > the
 > > > > > disk
 > > > > > > > OS image and the
 > > > > > > > > EPROM into a processor memory map. Various hardware
 > > > > peripherals
 > > > > > > > will also probably exist at certain addresses in the
 > memory
 > > > > map.
 > > > > > To
 > > > > > > > pull it all
 > > > > > > > > together you will ideally have the circuit
schematics,
 > > the
 > > > > > memory
 > > > > > > > map, CPU/chip documentation plus a detailed design
 > > > description
 > > > > of
 > > > > > > how
 > > > > > > > the system
 > > > > > > > > works. Often much of this data can be found in the
 > > product
 > > > > > > service
 > > > > > > > manual. Then you need to determine which routines are
 > > called
 > > > > when
 > > > > > > > MIDI/RS422
 > > > > > > > > interrupts are handled. Testing with a logic analyzer
 > > > probing
 > > > > > the
 > > > > > > > CPU would certainly make that easier.
 > > > > > > > >
 > > > > > > > > /Tristan
 > > > > > > > >
 > > > > > > > > >
 > > > > > > > >
 > > > > > > > >
 > > > > > > > > ///E-Synthesist
 > > > > > > > >
 > > > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
 > > > > > > > > >
 > > > > > > > > > That seems excessively slow, as the EII could load
a
 > > > > similar
 > > > > > > > sized
 > > > > > > > > bank from the same CDROM
 > > > > > > > > > drive in 12 seconds. Its hard to imagine Emu would
 > not
 > > > have
 > > > > > > > > implemented a similar load time on
 > > > > > > > > > the Emax if all it took was adding a software
 > routine.
 > > > But
 > > > > > then
 > > > > > > > > again, stranger things have
 > > > > > > > > > happened...
 > > > > > > > > >
 > > > > > > > > > /Tristan
 > > > > > > > > >
 > > > > > > > > > Quoting John Silveria II <john@>:
 > > > > > > > > >
 > > > > > > > > > > Somewhere, and I can't remember where, I read
that
 > > the
 > > > CD-
 > > > > > Rom
 > > > > > > > > drive
 > > > > > > > > > > took
 > > > > > > > > > > up to 5 minutes to load a bank. I wish I could
 > > remember
 > > > > > > where.
 > > > > > > > So
 > > > > > > > > > > indeed
 > > > > > > > > > > it was not only as slow as typical SYSEX load, it
 > > could
 > > > > > > > actually
 > > > > > > > > take
 > > > > > > > > > >
 > > > > > > > > > > longer.
 > > > > > > > > > >
 > > > >
 > > >
 > >
 >






[Non-text portions of this message have been removed]

Re: [emax] Re: RS422 fun

2008-11-22 by Ted Summers

OK- So I was being lazy.....

I found all the docs for the adapters you have.....

ON the Redcom- you have jumper on 17-18 I assume?

I would try all of the following:

Pin 7 to USB-Comi 7 (by itself)

Pin 7 to Comi 6&7 tied together

Pin 7 to USB-Comi 8 (by itself)

Pin 7 to Comi 8&9 tied together

Pin 7 to Comi 7&8 tied together



On RS232 for some "null modem" connections you have to do similar-
Tie DTR and CTS/RTS and sometimes CD together to get communications  
working.....

Regards.
Ted

Re: RS422 fun

2008-11-22 by esynthesist

Hi Ted, yes, the Emax documents mention synchronous communication, 
while the EII documents mention asynchronous communication.

Anyway it's clear that we need synchronous communication from the 
perspective that the host should be clocked by the slave (strange 
world we're living in :-) so they shouldn't clock independent from 
each other.
Of course the Emax and EII provide a clock signal to the Mac. That's 
clearly described in all documents. Moreover the internal clock of 
the Mac is not capable of generating 500 kbaud by itself, so this 
speed was only possible by providing a clock to the Mac.

The homepages of the devices I mentioned provide the (limited) 
information which accompanies these devices. I have no technical 
inside information. 
The Meilhaus is the only one I can open, and the main IC is labeled 
FTDI FT2328L 729-1.
The other 3 ICs are labeled:
- MAX3089E CSD0706 (two ICs)
- NXP 74HCT02D L7C1C303 Un60723D
and an oscillator (?) labeled 6.00F7PN
There's also a 4th small 8-pin IC but that one is too small to read 
its label :-)
The board is labeled KENT 2 94V-0.

But the main problem is that the "contact" with the "outside world" 
is provided by a DB9M connector only and some jumpers.
And in all of my devices this DB9M connector complies with 
the 'typical' RS422 pin layout. This means:
- 1 pin for the ground
- 4 pins for the data transmission (+ and -, send and receive)
- 4 pins for the handshaking (+ and -, RTS and CTS)
No pins are left, so no additional pins of the internal chips can be 
reached, unless one would solder direcly on them (and they are very 
small !). This is true for almost all RS422 ports out there, except 
for the minidin8 of the Mac.

It would be interesting to know if there are RS422 devices which have 
additional pins for things like external clocking.
Any device based on the chip used in the Mac should do the job (they 
told me it's something like a Philips SCN2651, I have the datasheet 
but no device using this IC)...

///E-Synthesist

--- In emax@yahoogroups.com, Ted Summers <djtbs1@...> wrote:
>
>  From the emax service manual.....
> 
> 
> This paragraph to me indicates a Synchronous clock at 500Khz. What 
I  
> can see from the schematic is that the signal from pin 7 connects 
to  
> the 9638 pin 6. The 9638 pin 6 is an output signal confirmed from 
the  
> parts datasheet. So the Emax is supplying the clock to the host  
> computer for timing.
> 
> So what you are saying is that none of these RS422 ports or 
converters  
> have a clock line input?
> 
> Do you have any links to the documentation for these RS422 devices  
> that we can review or are there any schematics for them or are you  
> able to determine any IC's used in them we could look at the  
> datasheets for?
> 
> Regards,
> Ted
> 
> 
> On Nov 22, 2008, at 9:14 AM, esynthesist wrote:
> 
> OK. If I was able to connect the clock of the Emax with the RS422
> port I would have done so from the very beginning of course :-)
> 
> But that's the whole problem: I haven't found a new PC RS422 port 
yet
> which is capable of being externally clocked. Also the specs 
provided
> on many vendor's websites are pretty vague.
> Perhaps some high end RS422 automation ports can be clocked, but
> these devices tend to be quite expensive (and still seem not to have
> this feature; the higher price is due to additional protection,
> better hardcases, breakout boxes, multiple ports, etc).
> 
> So: if anyone knows where to buy an affordable RS422 port (USB or PC
> Card/Express Card) which is externally clockable, I love to hear 
it !!
> 
> (Note: as far as I know the EII has the same serial communication
> setup as the Emax. Does this mean that the statement in the Emu
> document saying that the RS422 communication is "asynchronous" is a
> type/wrong ?)
> 
> ///E-Synthesist
> 
> --- In emax@yahoogroups.com, tu@ wrote:
>  >
>  > Ok, this explains why you are seeing errors in the data coming 
from
> the PC but not with data going to the PC. You are running the PC
> RS422 interfaces
>  > asynchronously when they need to synchronous with the Emax clock.
> Your cable also does not have the 500kHz clock from the Emax
> connected!
>  >
>  > When your PC RS422 interface is set to 500k baud with its 
internal
> clock the PC RS422 interface can receive the data from the Emax
> perfectly because
>  > the data is transmitted in the same format as a standard
> asynchronous UART transmission. However, the 6850 UART in the Emax 
is
> running in x1
>  > synchronous mode, where it needs one correctly aligned clock 
pulse
> for each start, stop and data bit received. As the Emax UART RX 
clock
> is fed from
>  > the same 500kHz clock that appears on its RS422 port, the 
received
> data needs to be properly synchronized with that clock edge.
>  >
>  > With your currect interfaces the PC UART will be happily
> transmitting data in sync with its internal clock but the
> asynchronous bit transitions will not
>  > always be in sync with the Emax 500kHz clock. Because of this the
> Emax will sometimes appear to work correctly but then the clock to
> data relationship
>  > will drift and there will be corruption in the received data.
>  >
>  > The best solution for this would be to get another RS422 card 
that
> allows operation from an external clock in x1 mode. The 500kHz x1
> UART clock is
>  > transmitted from pin 7 of the Emax RS422 connector and needs to 
be
> connected to the PC RS422 external clock input. Note that the 
CTS/RTS
> pins on
>  > serial ports are for hardware handshaking and not normally used 
as
> clock inputs. The Mac serial interface uses its HSKi pin as its
> external clock input
>  > but how this is implemented in another RS422 may be different.
>  >
>  > /Tristan
>  >
>  > Saturday, November 22, 2008, 9:03:23 PM, you wrote:
>  >
>  > >
>  > About the hardware I have used until now:
>  >
>  > Serial ports:
>  > - Meilhaus Redcom USB-COMI RS422 USB port. Also sold with other
> brand
>  > names such as Easysync; very popular one. --> This is the one I
> have
>  > best results with. Internal clockable at 500kbaud.
>  > - Moxa Uport 1150 RS422/RS232 USB port. This device does not
> support
>  > RTS/CTS handshaking for RS422 and is not internally clockable at
> 500
>  > kbaud. So it's useless :-)
>  > - Exsys EX-1362 double RS422 PCMCIA card. This one has the same
>  > features as the Meilhaus but the results where less reliable.
>  > - Ednet RS232 USB adapter 84204. A cheap RS232 device, just to 
see
> if
>  > this wouldn't work. It didn't.
>  >
>  > Cable/wiring:
>  > Until now I only used the GND and DATA signals, so I connected 5
> pins
>  > of the Emax/Emulator II to the PC RS422 as follows:
>  > - Emax PIN 3 (GND) to RS422 PIN 5 (GND)
>  > - Emax PIN 4 (RXD+) to RS422 PIN 2 (TXD+)
>  > - Emax PIN 5 (RXD-) to RS422 PIN 1 (TXD-)
>  > - Emax PIN 8 (TXD+) to RS422 PIN 3 (RXD+)
>  > - Emax PIN 9 (TXD-) to RS422 PIN 4 (RXD-)
>  > The cable is a 10-wire shielded cable of 1.5 meters long.
>  >
>  > (I already spent 300 EUR on serial devices, so I'm not planning 
to
>  > buy additional ones anymore :-)
>  >
>  > Final note: before I started this project with the EII/Emax, I 
had
>  > never programmed/monitored a serial device before, so let's say
> that
>  > my hardware/RS422 experience is low but increasing ...
>  >
>  > ///E-Synthesist
>  >
>  > --- In emax@yahoogroups.com, tu@ wrote:
>  > >
>  > > I think the solution here really depends on the actual cause of
> the
>  > problem. It may even be just some simple thing like the cable
> wiring
>  > or a driver
>  > > setting for the PC RS422 hardware. It would be helpful if you
> could
>  > provide some more detail on the hardware you are using. For a
> start,
>  > the exact
>  > > brand and model number of the RS422 interfaces and cables plus
> the
>  > wiring diagrams of the cables.
>  > >
>  > > The best case would be if you could get an existing PC RS422
>  > interface to work with the Emax with no hardware modification.
>  > Otherwise the solutions
>  > > start to get more complicated, such as modifying circuits,
> building
>  > an interface board or even having a microcontroller sitting 
between
>  > the PC and the
>  > > Emax doing protocol translation. But now you have the Emax
>  > protocols worked out I believe a solution can be achieved.
>  > >
>  > > If you don't have the tools to measure what is going on in the
>  > interface circuits then you will have difficulty sorting this 
out.
> I
>  > would suggest using a
>  > > digital oscilloscope to measure the TX and RX data signals plus
> the
>  > 500kHz clock at the Emax 6850 UART chip when the Emax is actually
>  > communicating
>  > > with both the Mac and the PC. You will need at least two
>  > oscilloscope channels to see the clock and the data 
simultaneously.
>  > More channels would be
>  > > nice, but the TX data and clock together and RX data and clock
>  > together are the first things to look at. You could also use a
> logic
>  > analyzer but I think an
>  > > oscilloscope is better because it will show the actual 
waveforms,
>  > not just the logic transitions.
>  > >
>  > > Unfortunately the Emax and Mac RS422 interfaces are products of
>  > their times, and times move on. No doubt it was a reasonable
> decision
>  > to implement
>  > > the interface to the host computer this way back in the 1980s.
>  > >
>  > > The sysex timeout is related to the dumping protocol and has no
>  > real bearing on what happens with the clocking at the data 
tranfer
>  > layer. But you could
>  > > always experiment with it to see if it makes any difference to
> the
>  > problem you are seeing. At this stage we do not know for sure 
that
>  > the problem is at
>  > > the low level.
>  > >
>  > > I am not sure how much experience you have with hardware and
>  > communications troubleshooting but I am happy to help or provide
>  > further if you
>  > > would like to pursue this. As I said in a previous email, I 
would
>  > like to see a general solution that would allow any of the Emu
> RS422
>  > equipped samplers
>  > > to be connected to a modern PC for sample dumping and/or bank
>  > transfer (where applicable). You have done fabulous work with the
>  > EMXP program and
>  > > seem to have the software and Emu formats and protocols worked
> out.
>  > So I think getting this happening should not be too hard :)
>  > >
>  > > /Tristan
>  > >
>  > > Saturday, November 22, 2008, 12:00:21 AM, you wrote:
>  > >
>  > > >
>  > > Thanks Tristan.
>  > >
>  > > I'm wondering though: even if we find the actual cause of the
>  > problem
>  > > (timing or signal level), I guess there's not much we can do to
>  > solve
>  > > the problem. Besides making a custom communication board of
> course.
>  > > Because I don't think characteristics such as "clock to data
>  > > relationship" can be configured on any normal commercial RS422
> port
>  > > device for PCs, right ?
>  > > That's in fact the only reason why I didn't invest in a scope
> yet:
>  > > exactly knowing the problem would be nice, but not being able 
to
>  > > solve it would be frustrating :-)
>  > > Man ! I would love the standard PC RS422 ports to be externally
>  > > clockable ! Why is this (once again) one of those "Mac"-only
>  > > features !
>  > >
>  > > Question: the RS422 communication "timeout period" on the Emax
> can
>  > be
>  > > configured with a SYSEX command (from 1 to 127 seconds). But I
>  > guess
>  > > this is not something that can help on the lowel level data
>  > > syncronization problem we are dealing with here, right ? I
>  > > guess "our" problem is more related to the speed at which a
> stream
>  > of
>  > > bits (as a whole) is entering the Emax port ?
>  > >
>  > > ///E-Synthesist
>  > >
>  > > --- In emax@yahoogroups.com, tu@ wrote:
>  > > >
>  > > > Yes, an oscilloscope is what you need. I suggest getting a
>  > digital
>  > > model as it should allow you to capture and store the signals 
you
>  > are
>  > > measuring. Some
>  > > > high end multimeters also have oscilloscope functions, but
> check
>  > > the bandwidth is well above the highest frequencies you will 
need
>  > to
>  > > measure. An audio
>  > > > card is not suitable for this task.
>  > > >
>  > > > I did a search on the Mac serial port and it seems that while
> the
>  > > output voltage levels are slightly non standard they should not
>  > > present any problems for
>  > > > the Emax 9637 RS422 receiver chip. I only have the Emax II
>  > > schematics but I believe the RS422 interface should be the same
> as
>  > > the Emax. The 9637
>  > > > circuit doesn't appear to have any EMI supression or
> termination
>  > > other than a pullup to +5V on the noninverting input. So the 
Emax
>  > is
>  > > relying on the
>  > > > sending circuit to ensure a reasonably clean signal arrives.
> The
>  > > Mac has an EMI filter on its RS422 port but I am not sure what
> your
>  > > PC RS422 port may
>  > > > have.
>  > > >
>  > > > Another thing to look at is the relationship between the 
500kHz
>  > > clock the Emax sends out and the data that is sent back to the
> Emax
>  > > from the PC. The
>  > > > 6850 UART in the Emax relies on a this being within a certain
>  > > timing range. If the clock to data relationship from the PC 
RS422
>  > > port is not the same as
>  > > > from the Mac then this could cause problems. The same would
> also
>  > > occur if the PC RS422 transmit clock is drifting because is not
>  > > locked to the same
>  > > > clock that it is receiving from the Emax. Of course the data
>  > being
>  > > sent from the Emax to the PC will be ok because the clock and
> data
>  > > are transmitted
>  > > > together with the correct timing relationship.
>  > > >
>  > > > /Tristan
>  > > >
>  > > > Tuesday, November 18, 2008, 3:58:48 AM, you wrote:
>  > > >
>  > > > >
>  > > > To have 100% certainty about the actual problem I should 
indeed
>  > do
>  > > > some measurements with an oscilloscope... but I don't have 
one.
>  > > > I was (and still) am thinking about buying one, either analog
> or
>  > > > digital. Until now I only did some measurements with an
> external
>  > > > audio card acting as a wave recorder, but its sampling
> frequency
>  > > and
>  > > > bandwith are - of course - insufficient to do proper
> measurements
>  > > on
>  > > > 500kbaud signals. What I do see however - even with this
> method -
>  > > is
>  > > > that the amplitude level of the Mac signal is much higher 
than
>  > the
>  > > PC
>  > > > signal.
>  > > > On the other hand, if the RS422 of the Emax is standard, 
then I
>  > > > shouldn't have any problem. Mmmm...
>  > > > Yes, the best solution would consist of a custom RS422 port 
for
>  > the
>  > > > PC which can even be externally clocked. But I'm not an
>  > electronics
>  > > > specialist so it will take a looooonnnnng time before I will
> end
>  > up
>  > > > with a working set :-)
>  > > >
>  > > > ///E-Synthesist
>  > > >
>  > > > --- In emax@yahoogroups.com, tu@ wrote:
>  > > > >
>  > > > > I am not sure about the Mac circuitry but the RS422 
interface
>  > on
>  > > > the Emax should just be standard
>  > > > > 9637 and 9638 RS422 buffers. The input threshold on the 
9637
>  > > > receiver is specified to be +/-
>  > > > > 200mV so it should work with voltages higher than that. Do
> you
>  > > have
>  > > > an oscilloscope that you can
>  > > > > use to probe the 9637 while it is receiving data? If so, 
you
>  > > could
>  > > > compare when receiving data
>  > > > > from the Mac and the PC via RS422.
>  > > > >
>  > > > > Its not a priority, but I think it would be worthwhile to
> have
>  > an
>  > > > RS422 interface that would allow
>  > > > > any PC to be used for sample dumping to the Emax I, Emax 
II,
>  > EII,
>  > > > EIII and EIIIx as well as bank
>  > > > > transfer with the EII and Emax. Even if an interface box 
cost
>  > > some
>  > > > money I feel there would be a
>  > > > > demand given the numbers of these samplers still in use. 
The
>  > Emu
>  > > > world cannot live on old Macs
>  > > > > alone :)
>  > > > >
>  > > > > /Tristan
>  > > > >
>  > > > > Monday, November 17, 2008, 3:24:57 AM, you wrote:
>  > > > >
>  > > > > >
>  > > > > After some additional testing I'm pretty sure the problems
> are
>  > > not
>  > > > > caused by timing differences, but by voltage levels.
>  > > > > I received a PCMCIA RS422 port this week, and this thing 
has
>  > even
>  > > > > more problems with communicating with the EII and the Emax
> than
>  > > my
>  > > > > USB/RS422 converter device. And again the communication
> problem
>  > > is
>  > > > to
>  > > > > be found in the PC->Emax transmit part, not in the receive
> part.
>  > > > > I mentioned before that the Mac RS422 is sending very high
>  > signal
>  > > > > levels (higher than "officially" allowed by the RS422
>  > standard).
>  > > > The
>  > > > > Emu samplers seem to rely on these high signals.
>  > > > > Conclusion: I give up the current experiments. Perhaps some
>  > time
>  > > in
>  > > > > the future I'll try to make a device based on Mac 
circuits...
>  > > > >
>  > > > > --- In emax@yahoogroups.com, tu@ wrote:
>  > > > > >
>  > > > > > Ok, that is interesting.
>  > > > > >
>  > > > > > An alternative to direct connection of the RS422 to the 
PC
>  > > would
>  > > > be
>  > > > > a microcontroller sitting
>  > > > > > between the PC and sampler. I think someone suggested 
that
>  > > > before.
>  > > > > It could respond to the
>  > > > > > sampler with tight timing but handle the loose timing 
over
>  > the
>  > > PC
>  > > > > connection. I guess the PC side
>  > > > > > could be implemented with either RS-232 or USB. But
> obviously
>  > > USB
>  > > > > would require a lot more
>  > > > > > coding than simply translating RS422 and RS232 port
> protocols
>  > > > with
>  > > > > a bit of buffering in between.
>  > > > > >
>  > > > > > /Tristan
>  > > > > >
>  > > > > > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
>  > > > > >
>  > > > > > >
>  > > > > > Yes it's about the same concept as on the EII: taking an
>  > exact
>  > > > dump
>  > > > > > of the internal Emax memory at 500 kbaud in both
> directions.
>  > Or
>  > > > in
>  > > > > > other words... transferring an EMX file across the serial
>  > line
>  > > > > > (except for the EMX 39 byte header string of course).
>  > > > > >
>  > > > > > But there are two major drawbacks compared with the EII:
>  > > > > > 1/ the Emax uses the MMA standard to accomplish this 
dump,
>  > > > meaning
>  > > > > > that the data is sent in packets of 120 bytes instead of
> 256
>  > > > bytes,
>  > > > > > which is slower.
>  > > > > > 2/ it's not possible to dump specific memory segments, 
the
>  > > whole
>  > > > > > thing must be dumped in one sequential loop from the very
>  > > > beginning
>  > > > > > (position 0) to the very end (position 552959).
>  > > > > >
>  > > > > > The second one is a BIG problem: it means that if 
something
>  > > goes
>  > > > > > wrong (like a bad packet) the whole dump must be 
restarted.
>  > > > > > And... since the PC RS422 communication line with the 
Emax
> is
>  > > not
>  > > > > > optimal, this kind of error will for sure occur during a
> bank
>  > > > > > transfer. On the EII, this means simply re-asking for the
>  > > > > particular
>  > > > > > bad data packet, but on the Emax you have to start all 
over
>  > > again.
>  > > > > >
>  > > > > > In practice this means that a full load/unload is simply
> not
>  > > > > possible
>  > > > > > with my current hardware (USB-RS422 and USB-RS232
> converters
>  > of
>  > > > all
>  > > > > > kinds) because the loop is restarted endlessly. At the 
end
> of
>  > > the
>  > > > > > week I'll try an non-USB port device, I hope that one 
will
>  > work.
>  > > > > > If not, a custom RS422 PC port must be built for the
>  > Emax/EII,
>  > > > > based
>  > > > > > on the RS422 circuits & ICs of the Mac.
>  > > > > >
>  > > > > > ///E-Synthesist
>  > > > > >
>  > > > > > --- In emax@yahoogroups.com, tu@ wrote:
>  > > > > > >
>  > > > > > > Fantastic! So, is it the same method that the EII uses
> for
>  > > bank
>  > > > > > transfer or something else? Is there
>  > > > > > > any chance you could document the protocol?
>  > > > > > >
>  > > > > > > I think 25-30 seconds should be acceptable for Emax I
> bank
>  > > > loads.
>  > > > > > At least it provides an option
>  > > > > > > for those who can't or don't want to add SCSI.
>  > > > > > >
>  > > > > > > The Emax II load time does sound a bit slow. But it 
might
>  > > still
>  > > > > be
>  > > > > > of use if someone had a working
>  > > > > > > Emax II with a dead SCSI chip.
>  > > > > > >
>  > > > > > > Out of interest, can the Emax II directly load an Emax 
I
>  > bank
>  > > > > (with
>  > > > > > compressed 8 bit samples) in
>  > > > > > > this way?
>  > > > > > >
>  > > > > > > /Tristan
>  > > > > > >
>  > > > > > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
>  > > > > > >
>  > > > > > > >
>  > > > > > > After some experiments during the weekend, the current
>  > status
>  > > > of
>  > > > > my
>  > > > > > > little RS422 project is that I know how to do *fast* 
bank
>  > > > > > > loads/unloads on the Emax via RS422.
>  > > > > > > This should reduce the total data transfer time to 25-
30
>  > > > seconds
>  > > > > on
>  > > > > > > the Emax-I instead of the 2-3 minutes of Alchemy. Most
>  > > probably
>  > > > > > this
>  > > > > > > was also the total load time of the OMI CDS3 system,
> which
>  > > is -
>  > > > > > let's
>  > > > > > > say - "acceptable"...
>  > > > > > > That's about the same speed as loading from a floppy :-
)
>  > but
>  > > > the
>  > > > > > > biggest advantage would be that one would have 
immediate
>  > > access
>  > > > > to
>  > > > > > > hundreds of banks on the PC harddrive instead of having
> to
>  > > copy
>  > > > > > > individual banks to floppy disks first...
>  > > > > > > Still SCSI is a much better alternative... for those
> having
>  > a
>  > > > > rev2
>  > > > > > or
>  > > > > > > rev3 board, and for those using the Emax-II. BTW at 
RS422
>  > > > speed,
>  > > > > > the
>  > > > > > > data transfer time on a fully loaded Emax-II Turbo 8M
> would
>  > > be
>  > > > > > about
>  > > > > > > 7 minutes :-). Fortunately every Emax-II is equipped 
with
>  > > SCSI.
>  > > > > > >
>  > > > > > > I have to write some decent software now which supports
> the
>  > > > full
>  > > > > > Emax
>  > > > > > > handshaking protocol. But I'm pretty sure that the 
USB<--
>  > > >RS422
>  > > > > > > converters will not be the best solution for this
>  > > > communication -
>  > > > > > > just like with the EII the communication seems to be
> quite
>  > > > > > unreliable
>  > > > > > > when transmitting data from the PC to the Emax, as a
>  > > > consequence
>  > > > > > the
>  > > > > > > total transfer time increases dramatically due to
>  > handshaking
>  > > > > > > overhead.
>  > > > > > > At the end of the week I will have a PCCard RS422 port 
on
>  > my
>  > > > > > laptop.
>  > > > > > > This piece of hardware does not suffer from USB 
latency,
> so
>  > I
>  > > > > hope
>  > > > > > it
>  > > > > > > will work better...
>  > > > > > >
>  > > > > > > ///E-Synthesist
>  > > > > > >
>  > > > > > > --- In emax@yahoogroups.com, "esynthesist" 
<esynthesist@>
>  > > wrote:
>  > > > > > > >
>  > > > > > > > Yes, I was also thinking there must be some dedicated
>  > > command
>  > > > > > (set)
>  > > > > > > > for fast load/unload. But the fact that John 
remembered
> a
>  > > > load
>  > > > > > time
>  > > > > > > > of 5 minutes for the OMI cdroms made me doubt 
again...
> On
>  > > the
>  > > > > > other
>  > > > > > > > hand it is true that OMI cdroms could only be used
> after
>  > > the
>  > > > > > > release
>  > > > > > > > of OS 3.2, so this is indeed an indication that
>  > additional
>  > > > > > commands
>  > > > > > > > have been added, or at least some changes have been
>  > > applied.
>  > > > I
>  > > > > > also
>  > > > > > > > observed that the v 3.2 MIDI protocol is not 100%
>  > behaving
>  > > as
>  > > > > > > > described in the v 3.0 document, e.g. the timeout
>  > handling
>  > > is
>  > > > > > > > different. So there are also changes in the 'normal'
>  > > > SYSEX/MMA
>  > > > > > > > protocol.
>  > > > > > > > By the way: the OMI drive also required a firmware
> update
>  > > in
>  > > > > > order
>  > > > > > > to
>  > > > > > > > be compatible with the Emax. Question is of course
>  > whether
>  > > > this
>  > > > > > was
>  > > > > > > > just a small firmware update (to support the newly
> added
>  > > > > commands
>  > > > > > > in
>  > > > > > > > the Emax OS) or a huge piece of Emax-specific code 
(to
>  > > > > implement
>  > > > > > > the
>  > > > > > > > full SYSEX/MMA command set - which is indeed quite
>  > > > unlikely) ...
>  > > > > > > >
>  > > > > > > > The Emax-II and EIII indeed have a filesystem which 
is
>  > > > > optimized
>  > > > > > > for
>  > > > > > > > handling different banksizes; I have the specs here
>  > because
>  > > I
>  > > > > > > needed
>  > > > > > > > them for EMXP. The EII and Emax are using filesystems
>  > with
>  > > > > fixed
>  > > > > > > > filesizes in a sequential order.
>  > > > > > > >
>  > > > > > > > Since I don't have any Emax OMI cdrom disk I'm not 
even
>  > > sure
>  > > > > > > whether
>  > > > > > > > the banks on these disks are "EMX-like" 8-bit images 
or
>  > > > > expanded
>  > > > > > 12
>  > > > > > > > bit images. It makes sense that they are 8-bit, 
because
>  > > this
>  > > > > > > allowed
>  > > > > > > > OMI to put more banks on a CD, to transfer them 
faster
> to
>  > > the
>  > > > > > Emax
>  > > > > > > > (if EII-like commands have been implemented in the 
Emax
>  > OS
>  > > of
>  > > > > > > course)
>  > > > > > > > and to use the same bank layout as on the Emax floppy
> and
>  > > > Emax
>  > > > > > > > harddisk banks.
>  > > > > > > >
>  > > > > > > > So despite the "5 minutes load time" note from John, 
I
>  > > think
>  > > > we
>  > > > > > can
>  > > > > > > > still assume that there is some specific command set 
in
>  > > V3.2
>  > > > > > which
>  > > > > > > > enables fast bank loads. I will try to find them out
>  > during
>  > > > the
>  > > > > > > > weekend, either by experimenting or by looking into 
the
>  > OS
>  > > > > > > > binary/disassembled code...
>  > > > > > > >
>  > > > > > > > ///E-Synthesist
>  > > > > > > >
>  > > > > > > >
>  > > > > > > >
>  > > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
>  > > > > > > > >
>  > > > > > > > > >
>  > > > > > > > > But the 5 minutes load time may have been 
reality...
>  > > > > > > > >
>  > > > > > > > > This can explain why I don't know anyone and find 
no
>  > > > > reference
>  > > > > > at
>  > > > > > > > all
>  > > > > > > > > of anyone who actually used this CD-ROM drive with
> the
>  > > > Emax.
>  > > > > If
>  > > > > > > > this
>  > > > > > > > > 5 minutes load time is true, this must have 
resulted
> in
>  > a
>  > > > > > > > commercial
>  > > > > > > > > failure for OMI when they launched the Emax OMI cd
>  > > disks...
>  > > > > but
>  > > > > > > > they
>  > > > > > > > > probably released these disks also in Mac/SD 
format ?
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > > Yes, such a slow load time would have been a major
>  > > > marketing
>  > > > > > > > problem. I find it difficult to imagine that Emu 
would
>  > not
>  > > > have
>  > > > > > > added
>  > > > > > > > the small amount of
>  > > > > > > > > extra code required to load in a bank quickly via
>  > RS422.
>  > > If
>  > > > > > they
>  > > > > > > > wanted to sell Emaxes then surely there was a strong
>  > > > incentive
>  > > > > to
>  > > > > > > > make the sound
>  > > > > > > > > library efficient to use. I suspect the OMI CDROM
>  > system
>  > > > for
>  > > > > > the
>  > > > > > > > Emax was not a major market success because of the
> cost.
>  > > The
>  > > > > OMI
>  > > > > > > > CDROM drive, or
>  > > > > > > > > even a Mac with a CDROM drive, would have cost a
>  > > > significant
>  > > > > > > > proportion of the cost of an Emax. The average 
musician
>  > > > > probably
>  > > > > > > > would not have been
>  > > > > > > > > able to justify that additional expense. 
Particularly
>  > so
>  > > > > given
>  > > > > > > that
>  > > > > > > > early CDROM drives were rather fragile.
>  > > > > > > > >
>  > > > > > > > > >
>  > > > > > > > >
>  > > > > > > > > And yes, Emu has done strange things. E.g. the EII
>  > cdrom
>  > > > kit
>  > > > > > > > > supported a "folder" or "category" system: the 
banks
> on
>  > a
>  > > > > disk
>  > > > > > > > could
>  > > > > > > > > be put in folders (like bank "piano" in
>  > folder "acoustic
>  > > > > > > > keyboards")
>  > > > > > > > > to make navigation much easier. This feature was 
not
>  > > > > available
>  > > > > > on
>  > > > > > > > the
>  > > > > > > > > Emax and EIII harddisks. Maybe Emu considered this 
to
>  > be
>  > > a
>  > > > > > > feature
>  > > > > > > > of
>  > > > > > > > > OMI and not of Emu themselves, but they could have
>  > > learned
>  > > > > from
>  > > > > > > > > that...
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > > Surely the category organisation was only a feature
> of
>  > > the
>  > > > > OMI
>  > > > > > > > CDROM system, as the EII had no control over it. So 
it
>  > was
>  > > > > OMI's
>  > > > > > > > CDROM format, not
>  > > > > > > > > Emu's format. But this also gave OMI the 
flexibility
> to
>  > > put
>  > > > > as
>  > > > > > > many
>  > > > > > > > banks on the disk as they wanted and to organise them
> as
>  > > they
>  > > > > > > wanted.
>  > > > > > > > There was
>  > > > > > > > > no restriction on how OMI could do this as long as
> they
>  > > > could
>  > > > > > > serve
>  > > > > > > > up the full memory image of each bank to the EII via
> the
>  > > > RS422
>  > > > > > port
>  > > > > > > > when required.
>  > > > > > > > >
>  > > > > > > > > Don't the Emax and the EII hard disk formats 
allocate
> a
>  > > > fixed
>  > > > > > > > number of banks for the disk? I believe you cannot 
fit
>  > any
>  > > > more
>  > > > > > > banks
>  > > > > > > > on the disk even if
>  > > > > > > > > the existing banks are only half full of samples.
>  > > > Presumably
>  > > > > > this
>  > > > > > > > is because the Emax and EII use a fixed memory size 
for
>  > > each
>  > > > > bank
>  > > > > > > and
>  > > > > > > > the complete
>  > > > > > > > > data for the bank is copied directly between memory
> and
>  > > > disk
>  > > > > > when
>  > > > > > > > you load or save a bank. Each hard disk bank is a the
>  > > > > equivalent
>  > > > > > of
>  > > > > > > > one floppy disk
>  > > > > > > > > image minus the OS data. I believe the Emax II and
> EIII
>  > > use
>  > > > > > > > variable sized banks. Therefore the number of banks
>  > stored
>  > > on
>  > > > a
>  > > > > > > hard
>  > > > > > > > disk or CDROM
>  > > > > > > > > depends on how much data is contained in each bank.
> But
>  > I
>  > > > > > believe
>  > > > > > > > there is still a limit of 100 banks per disk.
>  > > > > > > > >
>  > > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > > RS422 Communication with the Emulator was designed
>  > based
>  > > on
>  > > > > > > > following
>  > > > > > > > > key principles:
>  > > > > > > > > - all communication, including request/reply for
>  > > parameter
>  > > > > > > changes,
>  > > > > > > > > occurs at 500 Kbaud
>  > > > > > > > > - a whole bank can be downloaded/loaded with one
>  > special
>  > > > > > designed
>  > > > > > > > > type of command (a command which actually directly
>  > > > > reads/writes
>  > > > > > > the
>  > > > > > > > > RAM memory segments in which the bank data is
> residing)
>  > > > > > > > > - bulk data load/unload occurs with data packets
> sized
>  > > 256
>  > > > > > bytes,
>  > > > > > > > of
>  > > > > > > > > which each byte represents 1 sample point (data is
>  > > > > transferred
>  > > > > > in
>  > > > > > > > > compressed format)
>  > > > > > > > >
>  > > > > > > > > On the Emax, they seem to have decided that 
choosing
>  > for
>  > > a
>  > > > > > > > *standard*
>  > > > > > > > > medium speed protocol was more important than
> choosing
>  > > for
>  > > > a
>  > > > > > > > > *proprietary* high speed protocol. So they went for
> the
>  > > > MIDI
>  > > > > > > > > SYSES/MMA approach:
>  > > > > > > > > - all basic communication, including all
>  > > > > commands/instructions,
>  > > > > > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI
>  > sockets
>  > > > or
>  > > > > > the
>  > > > > > > > DB9
>  > > > > > > > > RS422 port are being used.
>  > > > > > > > > - loading/unloading banks requires the full set of
>  > SYSEX
>  > > > > > > commands.
>  > > > > > > > > Hence to simply download the parameters of just one
>  > voice
>  > > > of
>  > > > > > just
>  > > > > > > > one
>  > > > > > > > > preset, already multiple commands must be exchanged
>  > with
>  > > > the
>  > > > > > > Emax.
>  > > > > > > > > This is due to the fact that in general only one
>  > > parameter
>  > > > > can
>  > > > > > be
>  > > > > > > > > transferred per command. And this must be done at 
the
>  > > slow
>  > > > > > 31.25
>  > > > > > > > > Kbaud speed...mmmm...
>  > > > > > > > > - bulk data (sample) load/unload occurs with data
>  > packets
>  > > > > sized
>  > > > > > > > only
>  > > > > > > > > 120 bytes (MMA standard). Moreover each sample 
point
>  > > > requires
>  > > > > > 12
>  > > > > > > > bits
>  > > > > > > > > now instead of 8 bits on the EII since data is
>  > > transferred
>  > > > in
>  > > > > > > > linear
>  > > > > > > > > format instead of compressed format.
>  > > > > > > > > As a consequence, loading/unloading banks is much
>  > slower
>  > > > than
>  > > > > > on
>  > > > > > > > the
>  > > > > > > > > EII. Of course, once they released the Emax-II, 
they
>  > > would
>  > > > > have
>  > > > > > > > faced
>  > > > > > > > > problems anyway. This machine could have up to 8MB
>  > banks
>  > > > and
>  > > > > > > > doesn't
>  > > > > > > > > use compression, so even at full 500 kbaud speed 
and
>  > > using
>  > > > > only
>  > > > > > > one
>  > > > > > > > > command - which is impossible in reality - the 
Emax-
> II
>  > > > would
>  > > > > > > > require
>  > > > > > > > > at least 2.7 minutes for loading/unloading banks.
>  > > > Fortunately
>  > > > > > > there
>  > > > > > > > > was something invented called SCSI :-)
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > > Have a look at the MIDI spec for the Emax V3.0
>  > software.
>  > > > The
>  > > > > > fast
>  > > > > > > > (RS422) dumps use a protocol based on the MIDI SDS 
but
>  > > > slightly
>  > > > > > > > modified. The
>  > > > > > > > > sample data is dumped as 12 bit linear but the
> samples
>  > > are
>  > > > > > packed
>  > > > > > > > so that two 12 bit samples are transferred in three 8
> bit
>  > > > > bytes.
>  > > > > > It
>  > > > > > > > is also of note that
>  > > > > > > > > sending 8 bit wide data in this way violates the 
MIDI
>  > > > > standard,
>  > > > > > > as
>  > > > > > > > bit7 is always reserved as an indicator of a status
> byte.
>  > > Of
>  > > > > > course
>  > > > > > > > this is not really an
>  > > > > > > > > issue here as the 500k baud RS422 data is only 
being
>  > > > > > transferred
>  > > > > > > > to/from the Emax so no other MIDI devices will ever 
see
>  > > this
>  > > > > > > > violation of the
>  > > > > > > > > standard. But the outcome is that dumping samples 
as
> 12
>  > > bit
>  > > > > > only
>  > > > > > > > takes 50% longer than dumping as 8 bit compressed.
> Doing
>  > a
>  > > > > proper
>  > > > > > > > MIDI SDS dump
>  > > > > > > > > of 8 bit or 12 bit data actually takes the same
> amount
>  > of
>  > > > > time
>  > > > > > as
>  > > > > > > > only 7 data bits can be transferred for each byte in
> the
>  > > > > message.
>  > > > > > > So
>  > > > > > > > an 8 bit dump
>  > > > > > > > > takes two bytes per sample (7 + 1) while a 12 bit
> dump
>  > > also
>  > > > > > > > requires two bytes per sample (7 + 5). 16 bit dumps 
are
>  > > even
>  > > > > > slower
>  > > > > > > > as they require three
>  > > > > > > > > bytes per sample (7 + 7 + 2).
>  > > > > > > > >
>  > > > > > > > > As you have said, the failure to provide a means of
>  > > > directly
>  > > > > > > > transferring banks into memory via RS422 seems to be
> the
>  > > > > problem
>  > > > > > in
>  > > > > > > > the Emax, at least as
>  > > > > > > > > documented in the V3.0 MIDI spec. But if the V3.0
> spec
>  > > > > already
>  > > > > > > > provides all the functions required to load banks 
from
>  > the
>  > > > > CDROM
>  > > > > > > > drive using MIDI
>  > > > > > > > > SYSEX and RS422, then why is V3.2 or the SE 
software
>  > > > claimed
>  > > > > to
>  > > > > > > add
>  > > > > > > > OMI CDROM support? It still seems likely to me that
> some
>  > > > extra
>  > > > > > > > functions were
>  > > > > > > > > added in those versions to support fast bank 
loading
>  > via
>  > > > > RS422.
>  > > > > > > If
>  > > > > > > > not, then the OMI CDROM drive would have to be
> converting
>  > > the
>  > > > 8
>  > > > > > bit
>  > > > > > > > compressed
>  > > > > > > > > sample data on the CDROM to 12 bit linear in order 
to
>  > > dump
>  > > > > the
>  > > > > > > > samples into the Emax. The Emax would then have to
>  > convert
>  > > > the
>  > > > > 12
>  > > > > > > bit
>  > > > > > > > linear samples
>  > > > > > > > > back to compressed 8 bit samples. The transfer of
>  > samples
>  > > > > would
>  > > > > > > > also take 50% longer for 12 bit linear compared to 8
> bit
>  > > > > > > compressed.
>  > > > > > > > And of course
>  > > > > > > > > there would be no way for sequencer data included 
in
>  > the
>  > > > bank
>  > > > > > to
>  > > > > > > be
>  > > > > > > > loaded into the Emax. I could be wrong, but it just
> seems
>  > > > > > unlikely
>  > > > > > > > Emu would have
>  > > > > > > > > made it so difficult when a small software update 
to
>  > the
>  > > > Emax
>  > > > > > > could
>  > > > > > > > make bank dumping work in much the same way as the 
EII.
>  > > > > > > > >
>  > > > > > > > > >
>  > > > > > > > >
>  > > > > > > > > Nevertheless I will still do some experiments to 
find
>  > out
>  > > > if
>  > > > > > the
>  > > > > > > > Emax
>  > > > > > > > > OS doesn't have any "fast bank load" commands...
>  > > > > > > > > By the way: does anyone know whether the binary 
code
> of
>  > > the
>  > > > > > Emax
>  > > > > > > OS
>  > > > > > > > > can easily be de-compiled/disassembled in some way 
in
>  > > order
>  > > > > to
>  > > > > > > get
>  > > > > > > > > some kind of source code ? Is a simple Z80
> disassembler
>  > > > > > > sufficient ?
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > > Unfortunately it seems the only way is to 
experiment
>  > and
>  > > > see
>  > > > > > what
>  > > > > > > > can be uncovered. The Emax NS32000 main CPU code can 
be
>  > > > > > > disassembled
>  > > > > > > > but it is
>  > > > > > > > > not a common processor. The hard part of analyzing
> the
>  > > > > > > disassembled
>  > > > > > > > code is working out where the program and data begins
> and
>  > > > ends
>  > > > > as
>  > > > > > > > well as what
>  > > > > > > > > interrupt routines are being handled at runtime and
> how
>  > > > they
>  > > > > > > > interact. You would need to combine together the code
>  > from
>  > > > the
>  > > > > > disk
>  > > > > > > > OS image and the
>  > > > > > > > > EPROM into a processor memory map. Various hardware
>  > > > > peripherals
>  > > > > > > > will also probably exist at certain addresses in the
>  > memory
>  > > > > map.
>  > > > > > To
>  > > > > > > > pull it all
>  > > > > > > > > together you will ideally have the circuit
> schematics,
>  > > the
>  > > > > > memory
>  > > > > > > > map, CPU/chip documentation plus a detailed design
>  > > > description
>  > > > > of
>  > > > > > > how
>  > > > > > > > the system
>  > > > > > > > > works. Often much of this data can be found in the
>  > > product
>  > > > > > > service
>  > > > > > > > manual. Then you need to determine which routines are
>  > > called
>  > > > > when
>  > > > > > > > MIDI/RS422
>  > > > > > > > > interrupts are handled. Testing with a logic 
analyzer
>  > > > probing
>  > > > > > the
>  > > > > > > > CPU would certainly make that easier.
>  > > > > > > > >
>  > > > > > > > > /Tristan
>  > > > > > > > >
>  > > > > > > > > >
>  > > > > > > > >
>  > > > > > > > >
>  > > > > > > > > ///E-Synthesist
>  > > > > > > > >
>  > > > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
>  > > > > > > > > >
>  > > > > > > > > > That seems excessively slow, as the EII could 
load
> a
>  > > > > similar
>  > > > > > > > sized
>  > > > > > > > > bank from the same CDROM
>  > > > > > > > > > drive in 12 seconds. Its hard to imagine Emu 
would
>  > not
>  > > > have
>  > > > > > > > > implemented a similar load time on
>  > > > > > > > > > the Emax if all it took was adding a software
>  > routine.
>  > > > But
>  > > > > > then
>  > > > > > > > > again, stranger things have
>  > > > > > > > > > happened...
>  > > > > > > > > >
>  > > > > > > > > > /Tristan
>  > > > > > > > > >
>  > > > > > > > > > Quoting John Silveria II <john@>:
>  > > > > > > > > >
>  > > > > > > > > > > Somewhere, and I can't remember where, I read
> that
>  > > the
>  > > > CD-
>  > > > > > Rom
>  > > > > > > > > drive
>  > > > > > > > > > > took
>  > > > > > > > > > > up to 5 minutes to load a bank. I wish I could
>  > > remember
>  > > > > > > where.
>  > > > > > > > So
>  > > > > > > > > > > indeed
>  > > > > > > > > > > it was not only as slow as typical SYSEX load, 
it
Show quoted textHide quoted text
>  > > could
>  > > > > > > > actually
>  > > > > > > > > take
>  > > > > > > > > > >
>  > > > > > > > > > > longer.
>  > > > > > > > > > >
>  > > > >
>  > > >
>  > >
>  >
> 
> 
> 
> 
> 
> 
> [Non-text portions of this message have been removed]
>

Re: RS422 fun

2008-11-22 by esynthesist

And these experiments can not harm/damage my Emulator II/Emax/PC 
RS422 port ???

///E-Synthesist

--- In emax@yahoogroups.com, Ted Summers <djtbs1@...> wrote:
>
> OK- So I was being lazy.....
> 
> I found all the docs for the adapters you have.....
> 
> ON the Redcom- you have jumper on 17-18 I assume?
> 
> I would try all of the following:
> 
> Pin 7 to USB-Comi 7 (by itself)
> 
> Pin 7 to Comi 6&7 tied together
> 
> Pin 7 to USB-Comi 8 (by itself)
> 
> Pin 7 to Comi 8&9 tied together
> 
> Pin 7 to Comi 7&8 tied together
> 
> 
> 
> On RS232 for some "null modem" connections you have to do similar-
> Tie DTR and CTS/RTS and sometimes CD together to get 
communications  
Show quoted textHide quoted text
> working.....
> 
> Regards.
> Ted
>

Re: [emax] Re: RS422 fun

2008-11-22 by Ted Summers

These are signal level ins/outs. I have never had that sort of  
interconnect for data strapping kill anything.

They are very common on RS-232, and I have done some on RS422 before  
also.

Regards,
Ted

On Nov 22, 2008, at 12:27 PM, esynthesist wrote:

And these experiments can not harm/damage my Emulator II/Emax/PC
RS422 port ???

///E-Synthesist

--- In emax@yahoogroups.com, Ted Summers <djtbs1@...> wrote:
 >
 > OK- So I was being lazy.....
 >
 > I found all the docs for the adapters you have.....
 >
 > ON the Redcom- you have jumper on 17-18 I assume?
 >
 > I would try all of the following:
 >
 > Pin 7 to USB-Comi 7 (by itself)
 >
 > Pin 7 to Comi 6&7 tied together
 >
 > Pin 7 to USB-Comi 8 (by itself)
 >
 > Pin 7 to Comi 8&9 tied together
 >
 > Pin 7 to Comi 7&8 tied together
 >
 >
 >
 > On RS232 for some "null modem" connections you have to do similar-
 > Tie DTR and CTS/RTS and sometimes CD together to get
communications
 > working.....
 >
 > Regards.
 > Ted
 >






[Non-text portions of this message have been removed]

Re: [emax] Re: RS422 fun

2008-11-23 by mr julian

those RTS(ready to send)  and CTS(clear to send) +/-(differential pairs) 
are two separate signals. neither of which is a clock. They're 
handshaking signals, used to signal and control the data flow between 2 
devices.

So if that's what you have on your RS422 ports, but nothing labeled 
something like "clock in" or "clock I/O" you don't have any synchronous 
comms compatible RS422.

It appears that without synchronous communication, the emax won't 
work... after first posting about what you might need, I went and got 
back my copy of the emax service manual, and it shows very clearly a 
500k signal going from the emax to the computer.

the issue here is, that with a different 500k clock on the receiver, you 
can have the units basically appear to work. but no two 500k clocks are 
exactly the same frequency - and here's the sticky bit - the emax needs 
a long sustained transfer... so even if they start off in step, 
eventually the timing of the devices moves so the receiver is out of 
time with the transmitter, and you get a data error...sound familiar? 
and because it appears that  the emax kills a whole transfer on a data 
error, once that happens, it's all over. if the EII has a more robust 
protocol, it could run without synchronisation, and just re-transmit a 
failed packet whenever inevitable clock differences cause a problem.

I thought I had sent a link earlier to a card that would work, but on 
double checking I hadn't.... must have looked it up when i was 
investigation the PC side of synchronous RS422, but not sent the 
link..... anyway - here is one that will do what you want, on 
configuring correctly and hooking up the right pins. but US$399 makes it 
more expensive than an emax...
http://www.quatech.com/catalog/rs422s_pcmcia.php
I've just spent an hour or two looking around, and haven't found much 
that will do what you need for a lot cheaper.....
:-(


Anyway.. I'm spending another few hours evaluating something else now.

I've had one of these sitting around at home for a while
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3879

And its a cold windy sunday afternoon here.
I've been meaning to have a go at playing with that eval board with this 
software for a while.
http://www.fourwalledcubicle.com/MyUSB.php

I'm not sure if it's an option yet, but this could be the basis of a 
solution for the problem. Especially if the issue isn't packet-packet 
timing, but is simply just an issue with serial data synchronisation...





esynthesist wrote:
Show quoted textHide quoted text
>You made be thinking again.
>
>When I started my experiments I asked for some advice on serial 
>communication on a Dutch electronics internet group. One of my 
>questions was whether the 4 handshake signals on the standard RS422 
>(RTS+, RTS-, CTS+, CTS-) can be compared in some way to the HSKi and 
>HSKo signals of the Mac serial port. Specifically I was also asking 
>what to do with the + and - signals, given the fact that the 
>Emax/Emulator sends a clock signal which is going + and - on the same 
>line, while the RS422 expects seperated opposite signals.
>I also asked if an independent clock in the PC RS422, running at 
>500kbaud would be sufficient, instead of external clocking.  
>At the end the experts on this group confirmed that an independent 
>clock should be OK, even if it's not clocking exactly at the same 
>speed of the Emulator II and that phasing problems can be ignored.
>One of the arguments they based their conclusion on was that the 
>Emulator II communication protocol is *asynchronous* (as also stated 
>in the technical documents of the EII).
>Were they wrong ?
>
>And do you know the most appropriate wiring between the 4 
>RS422 "clock" pins and the single clock pin of the Emax/Emulator II ?
>
>Or do I understand you completely wrong, and are those "external 
>clockable RS422 devices for the PC" not using these 4 signals but 
>even another one ?
>
>By the way: what exact link to which RS422 device are you talking 
>about ? I reviewed the messages but didn't find a direct link ?
>
>///E-Synthesist
>
>  
>

Re: RS422 fun

2008-11-23 by esynthesist

>>>here is one that will do what you want, on
configuring correctly and hooking up the right pins. but US$399 makes 
it
more expensive than an emax...
<<<

Oops. I'm getting depressed finding out that my s/h USD50 old Mac is 
equipped with two (!) serial ports capable of what one (!) new USD399 
one can do. And for that 50 dollars the Mac package also includes a 
computer with screen, keyboard, harddisk and floppy drive :-)
(ok, the Quatech will have more *serial* features, but still...)

So I guess the next step is custom building one, e.g. with 
experimental/evaluation boards or from scratch. 
Not my piece of cake...

I guess experimenting with the CTS/RTS signals also does not make 
sense anymore, right ? I thought it could be a way to keep the 
drifting under control... I guess not... 
And I'm still a bit afraid that it could damage my PC RS422 port 
since the RTS/CTS pins are expecting either positive or negative 
voltages but not a mixture of them. Or are those ports typically 
protected against this "abuse" ?

In the meanwhile I currently have an "almost perfect" setup in my 
studio: One Mac Classic, with an external ZIP drive and CDROM drive, 
is connected to both the Emax (printer port) and the Emulator II 
(modem port).
The only problem is that I can't run both Sound Designer for EII and 
Sound Designer for Emax at the same time due to memory restrictions. 
I was hoping my Powerbook 180 - which has also two serial ports - 
would be the solution, but this machine requires AppleTalk to be ON 
for communicating with the EII, which unfortunately disables the 
Printer port for the Emax.
Well... we're not living in a perfect world :-)
Maybe I will give each of the instruments its own Mac...

...until we have the ultimate PC solution of course (with 2 or more 
RS422 ports on it)

///E-Synthesist

--- In emax@yahoogroups.com, mr julian <jujulilianan@...> wrote:
>
> 
> those RTS(ready to send)  and CTS(clear to send) +/-(differential 
pairs) 
> are two separate signals. neither of which is a clock. They're 
> handshaking signals, used to signal and control the data flow 
between 2 
> devices.
> 
> So if that's what you have on your RS422 ports, but nothing labeled 
> something like "clock in" or "clock I/O" you don't have any 
synchronous 
> comms compatible RS422.
> 
> It appears that without synchronous communication, the emax won't 
> work... after first posting about what you might need, I went and 
got 
> back my copy of the emax service manual, and it shows very clearly 
a 
> 500k signal going from the emax to the computer.
> 
> the issue here is, that with a different 500k clock on the 
receiver, you 
> can have the units basically appear to work. but no two 500k clocks 
are 
> exactly the same frequency - and here's the sticky bit - the emax 
needs 
> a long sustained transfer... so even if they start off in step, 
> eventually the timing of the devices moves so the receiver is out 
of 
> time with the transmitter, and you get a data error...sound 
familiar? 
> and because it appears that  the emax kills a whole transfer on a 
data 
> error, once that happens, it's all over. if the EII has a more 
robust 
> protocol, it could run without synchronisation, and just re-
transmit a 
> failed packet whenever inevitable clock differences cause a problem.
> 
> I thought I had sent a link earlier to a card that would work, but 
on 
> double checking I hadn't.... must have looked it up when i was 
> investigation the PC side of synchronous RS422, but not sent the 
> link..... anyway - here is one that will do what you want, on 
> configuring correctly and hooking up the right pins. but US$399 
makes it 
> more expensive than an emax...
> http://www.quatech.com/catalog/rs422s_pcmcia.php
> I've just spent an hour or two looking around, and haven't found 
much 
> that will do what you need for a lot cheaper.....
> :-(
> 
> 
> Anyway.. I'm spending another few hours evaluating something else 
now.
> 
> I've had one of these sitting around at home for a while
> http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3879
> 
> And its a cold windy sunday afternoon here.
> I've been meaning to have a go at playing with that eval board with 
this 
> software for a while.
> http://www.fourwalledcubicle.com/MyUSB.php
> 
> I'm not sure if it's an option yet, but this could be the basis of 
a 
> solution for the problem. Especially if the issue isn't packet-
packet 
> timing, but is simply just an issue with serial data 
synchronisation...
> 
> 
> 
> 
> 
> esynthesist wrote:
> 
> >You made be thinking again.
> >
> >When I started my experiments I asked for some advice on serial 
> >communication on a Dutch electronics internet group. One of my 
> >questions was whether the 4 handshake signals on the standard 
RS422 
> >(RTS+, RTS-, CTS+, CTS-) can be compared in some way to the HSKi 
and 
> >HSKo signals of the Mac serial port. Specifically I was also 
asking 
> >what to do with the + and - signals, given the fact that the 
> >Emax/Emulator sends a clock signal which is going + and - on the 
same 
> >line, while the RS422 expects seperated opposite signals.
> >I also asked if an independent clock in the PC RS422, running at 
> >500kbaud would be sufficient, instead of external clocking.  
> >At the end the experts on this group confirmed that an independent 
> >clock should be OK, even if it's not clocking exactly at the same 
> >speed of the Emulator II and that phasing problems can be ignored.
> >One of the arguments they based their conclusion on was that the 
> >Emulator II communication protocol is *asynchronous* (as also 
stated 
> >in the technical documents of the EII).
> >Were they wrong ?
> >
> >And do you know the most appropriate wiring between the 4 
> >RS422 "clock" pins and the single clock pin of the Emax/Emulator 
II ?
Show quoted textHide quoted text
> >
> >Or do I understand you completely wrong, and are those "external 
> >clockable RS422 devices for the PC" not using these 4 signals but 
> >even another one ?
> >
> >By the way: what exact link to which RS422 device are you talking 
> >about ? I reviewed the messages but didn't find a direct link ?
> >
> >///E-Synthesist
> >
> >  
> >
>

Re: [emax] Re: RS422 fun

2008-11-23 by mr julian

esynthesist wrote:

> Oops. I'm getting depressed finding out that my s/h USD50 old Mac is
>
>equipped with two (!) serial ports capable of what one (!) new USD399 
>one can do. And for that 50 dollars the Mac package also includes a 
>computer with screen, keyboard, harddisk and floppy drive :-)
>(ok, the Quatech will have more *serial* features, but still...)
>  
>
yeah.... modern computers move on from old tech, but then when you need 
the simple old features of the old tech, they're no longer a standard 
item, and you pay $$

>So I guess the next step is custom building one, e.g. with 
>experimental/evaluation boards or from scratch. 
>Not my piece of cake...
>  
>
Well, I did some investigating, and got the basic RS232 adapter test 
code up and working with serial loopback on my dev board, and read 
through the manual about setting up the avr USART for synchronous 
communication, which looks really simple...  (though will have to build 
some buffer circuits, and then do more testing running it in loopback, 
while being externally clocked form the emax, before I can say it'll 
even be approaching being a possibly being useful solution)

note: this will never work as well as a proper US$399 synchronous 
interface, because it will be limited by whatever buffer size that can 
be made in the AVR(which has only 8k of ram), after the USB stack and 
the basic code takes everything it needs,  but it's possible that maybe 
with a bit of tweaking, it can be made to work well enough to send and 
receive packets for the emax... as long as it's allowed to spend a bit 
of time shuffling data to/from the PC between packets....

so - how big are the packets that the emax sends and receives, anyway??

>I guess experimenting with the CTS/RTS signals also does not make 
>sense anymore, right ? I thought it could be a way to keep the 
>drifting under control... I guess not... 
>  
>
nope... sorry... it's the mechanism for either side of the comms pair to 
say "hold up! I've had enough!!" to the other side, instead of just 
overflowing and crapping out...

looking at my service manual again, I don't see CTS or RTS here 
either.... just tx, rx, and clock. so I guess that's all we need, to 
talk to the emax from a PC?

>And I'm still a bit afraid that it could damage my PC RS422 port 
>since the RTS/CTS pins are expecting either positive or negative 
>voltages but not a mixture of them. Or are those ports typically 
>protected against this "abuse" ?
>  
>
They are protected, to some degree.

btw, "+" and "-" do not refer to the voltage polarity of a balanced 
signal, they refer to the logical polarity. in this case, I think you'll 
find RS422 + and - parts of a signal are both always in the range of 0V 
to 5V, but the "+" is 5V when the "-" is 0v, and the "-" is 5V when the 
"+ is 0v....

Re: [emax] Re: RS422 fun

2008-11-23 by tu@...

Sunday, November 23, 2008, 1:14:29 AM, you wrote:

>OK. If I was able to connect the clock of the Emax with the RS422 
>port I would have done so from the very beginning of course :-)

Yes, the unconnected clock line should have been a warning sign that something was not quite right 
in your setup :P

>But that's the whole problem: I haven't found a new PC RS422 port yet 
>which is capable of being externally clocked. Also the specs provided 
>on many vendor's websites are pretty vague.
>Perhaps some high end RS422 automation ports can be clocked, but 
>these devices tend to be quite expensive (and still seem not to have 
>this feature; the higher price is due to additional protection, 
>better hardcases, breakout boxes, multiple ports, etc).

Yes, I looked around and noticed the same thing.

>So: if anyone knows where to buy an affordable RS422 port (USB or PC 
>Card/Express Card) which is externally clockable, I love to hear it !!
>
>(Note: as far as I know the EII has the same serial communication 
>setup as the Emax. Does this mean that the statement in the Emu 
>document saying that the RS422 communication is "asynchronous" is a 
>type/wrong ?)

It is possible they are referring to the RS232 port that the earlier EII had. It is also possible the EII 
has a different UART to the Emax and does not require the RX data to be synchronized to the 
500kHz clock. The 500kHz clock could just be for use by the Mac in setting its baud rate. I do not 
have the full schematics for the EII so I cannot say for sure.

/Tristan

--- In emax@yahoogroups.com, tu@... wrote:
>
> Ok, this explains why you are seeing errors in the data coming from 
the PC but not with data going to the PC. You are running the PC 
RS422 interfaces 
> asynchronously when they need to synchronous with the Emax clock. 
Your cable also does not have the 500kHz clock from the Emax 
connected!
> 
> When your PC RS422 interface is set to 500k baud with its internal 
clock the PC RS422 interface can receive the data from the Emax 
perfectly because 
> the data is transmitted in the same format as a standard 
asynchronous UART transmission. However, the 6850 UART in the Emax is 
running in x1 
> synchronous mode, where it needs one correctly aligned clock pulse 
for each start, stop and data bit received. As the Emax UART RX clock 
is fed from 
> the same 500kHz clock that appears on its RS422 port, the received 
data needs to be properly synchronized with that clock edge. 
> 
> With your currect interfaces the PC UART will be happily 
transmitting data in sync with its internal clock but the 
asynchronous bit transitions will not 
> always be in sync with the Emax 500kHz clock. Because of this the 
Emax will sometimes appear to work correctly but then the clock to 
data relationship 
> will drift and there will be corruption in the received data. 
> 
> The best solution for this would be to get another RS422 card that 
allows operation from an external clock in x1 mode. The 500kHz x1 
UART clock is 
> transmitted from pin 7 of the Emax RS422 connector and needs to be 
connected to the PC RS422 external clock input. Note that the CTS/RTS 
pins on 
> serial ports are for hardware handshaking and not normally used as 
clock inputs. The Mac serial interface uses its HSKi pin as its 
external clock input 
> but how this is implemented in another RS422 may be different.
> 
> /Tristan
> 
> Saturday, November 22, 2008, 9:03:23 PM, you wrote:
> 
> >
> About the hardware I have used until now:
> 
> Serial ports:
> - Meilhaus Redcom USB-COMI RS422 USB port. Also sold with other 
brand 
> names such as Easysync; very popular one. --> This is the one I 
have 
> best results with. Internal clockable at 500kbaud. 
> - Moxa Uport 1150 RS422/RS232 USB port. This device does not 
support 
> RTS/CTS handshaking for RS422 and is not internally clockable at 
500 
> kbaud. So it's useless :-)
> - Exsys EX-1362 double RS422 PCMCIA card. This one has the same 
> features as the Meilhaus but the results where less reliable.
> - Ednet RS232 USB adapter 84204. A cheap RS232 device, just to see 
if 
> this wouldn't work. It didn't. 
> 
> Cable/wiring:
> Until now I only used the GND and DATA signals, so I connected 5 
pins 
> of the Emax/Emulator II to the PC RS422 as follows:
> - Emax PIN 3 (GND) to RS422 PIN 5 (GND)
> - Emax PIN 4 (RXD+) to RS422 PIN 2 (TXD+)
> - Emax PIN 5 (RXD-) to RS422 PIN 1 (TXD-)
> - Emax PIN 8 (TXD+) to RS422 PIN 3 (RXD+)
> - Emax PIN 9 (TXD-) to RS422 PIN 4 (RXD-)
> The cable is a 10-wire shielded cable of 1.5 meters long.
> 
> (I already spent 300 EUR on serial devices, so I'm not planning to 
> buy additional ones anymore :-)
> 
> Final note: before I started this project with the EII/Emax, I had 
> never programmed/monitored a serial device before, so let's say 
that 
> my hardware/RS422 experience is low but increasing ...
> 
> ///E-Synthesist
> 
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > I think the solution here really depends on the actual cause of 
the 
> problem. It may even be just some simple thing like the cable 
wiring 
> or a driver 
> > setting for the PC RS422 hardware. It would be helpful if you 
could 
> provide some more detail on the hardware you are using. For a 
start, 
> the exact 
> > brand and model number of the RS422 interfaces and cables plus 
the 
> wiring diagrams of the cables.
> > 
> > The best case would be if you could get an existing PC RS422 
> interface to work with the Emax with no hardware modification. 
> Otherwise the solutions 
> > start to get more complicated, such as modifying circuits, 
building 
> an interface board or even having a microcontroller sitting between 
> the PC and the 
> > Emax doing protocol translation. But now you have the Emax 
> protocols worked out I believe a solution can be achieved. 
> > 
> > If you don't have the tools to measure what is going on in the 
> interface circuits then you will have difficulty sorting this out. 
I 
> would suggest using a 
> > digital oscilloscope to measure the TX and RX data signals plus 
the 
> 500kHz clock at the Emax 6850 UART chip when the Emax is actually 
> communicating 
> > with both the Mac and the PC. You will need at least two 
> oscilloscope channels to see the clock and the data simultaneously. 
> More channels would be 
> > nice, but the TX data and clock together and RX data and clock 
> together are the first things to look at. You could also use a 
logic 
> analyzer but I think an 
> > oscilloscope is better because it will show the actual waveforms, 
> not just the logic transitions.
> > 
> > Unfortunately the Emax and Mac RS422 interfaces are products of 
> their times, and times move on. No doubt it was a reasonable 
decision 
> to implement 
> > the interface to the host computer this way back in the 1980s.
> > 
> > The sysex timeout is related to the dumping protocol and has no 
> real bearing on what happens with the clocking at the data tranfer 
> layer. But you could 
> > always experiment with it to see if it makes any difference to 
the 
> problem you are seeing. At this stage we do not know for sure that 
> the problem is at 
> > the low level.
> > 
> > I am not sure how much experience you have with hardware and 
> communications troubleshooting but I am happy to help or provide 
> further if you 
> > would like to pursue this. As I said in a previous email, I would 
> like to see a general solution that would allow any of the Emu 
RS422 
> equipped samplers 
> > to be connected to a modern PC for sample dumping and/or bank 
> transfer (where applicable). You have done fabulous work with the 
> EMXP program and 
> > seem to have the software and Emu formats and protocols worked 
out. 
> So I think getting this happening should not be too hard :)
> > 
> > /Tristan
> > 
> > Saturday, November 22, 2008, 12:00:21 AM, you wrote:
> > 
> > >
> > Thanks Tristan.
> > 
> > I'm wondering though: even if we find the actual cause of the 
> problem 
> > (timing or signal level), I guess there's not much we can do to 
> solve 
> > the problem. Besides making a custom communication board of 
course.
> > Because I don't think characteristics such as "clock to data 
> > relationship" can be configured on any normal commercial RS422 
port 
> > device for PCs, right ?
> > That's in fact the only reason why I didn't invest in a scope 
yet: 
> > exactly knowing the problem would be nice, but not being able to 
> > solve it would be frustrating :-)
> > Man ! I would love the standard PC RS422 ports to be externally 
> > clockable ! Why is this (once again) one of those "Mac"-only 
> > features !
> > 
> > Question: the RS422 communication "timeout period" on the Emax 
can 
> be 
> > configured with a SYSEX command (from 1 to 127 seconds). But I 
> guess 
> > this is not something that can help on the lowel level data 
> > syncronization problem we are dealing with here, right ? I 
> > guess "our" problem is more related to the speed at which a 
stream 
> of 
> > bits (as a whole) is entering the Emax port ?
> > 
> > ///E-Synthesist 
> > 
> > --- In emax@yahoogroups.com, tu@ wrote:
> > >
> > > Yes, an oscilloscope is what you need. I suggest getting a 
> digital 
> > model as it should allow you to capture and store the signals you 
> are 
> > measuring. Some 
> > > high end multimeters also have oscilloscope functions, but 
check 
> > the bandwidth is well above the highest frequencies you will need 
> to 
> > measure. An audio 
> > > card is not suitable for this task.
> > > 
> > > I did a search on the Mac serial port and it seems that while 
the 
> > output voltage levels are slightly non standard they should not 
> > present any problems for 
> > > the Emax 9637 RS422 receiver chip. I only have the Emax II 
> > schematics but I believe the RS422 interface should be the same 
as 
> > the Emax. The 9637 
> > > circuit doesn't appear to have any EMI supression or 
termination 
> > other than a pullup to +5V on the noninverting input. So the Emax 
> is 
> > relying on the 
> > > sending circuit to ensure a reasonably clean signal arrives. 
The 
> > Mac has an EMI filter on its RS422 port but I am not sure what 
your 
> > PC RS422 port may 
> > > have.
> > > 
> > > Another thing to look at is the relationship between the 500kHz 
> > clock the Emax sends out and the data that is sent back to the 
Emax 
> > from the PC. The 
> > > 6850 UART in the Emax relies on a this being within a certain 
> > timing range. If the clock to data relationship from the PC RS422 
> > port is not the same as 
> > > from the Mac then this could cause problems. The same would 
also 
> > occur if the PC RS422 transmit clock is drifting because is not 
> > locked to the same 
> > > clock that it is receiving from the Emax. Of course the data 
> being 
> > sent from the Emax to the PC will be ok because the clock and 
data 
> > are transmitted 
> > > together with the correct timing relationship.
> > > 
> > > /Tristan
> > > 
> > > Tuesday, November 18, 2008, 3:58:48 AM, you wrote:
> > > 
> > > >
> > > To have 100% certainty about the actual problem I should indeed 
> do 
> > > some measurements with an oscilloscope... but I don't have one.
> > > I was (and still) am thinking about buying one, either analog 
or 
> > > digital. Until now I only did some measurements with an 
external 
> > > audio card acting as a wave recorder, but its sampling 
frequency 
> > and 
> > > bandwith are - of course - insufficient to do proper 
measurements 
> > on 
> > > 500kbaud signals. What I do see however - even with this 
method - 
> > is 
> > > that the amplitude level of the Mac signal is much higher than 
> the 
> > PC 
> > > signal.
> > > On the other hand, if the RS422 of the Emax is standard, then I 
> > > shouldn't have any problem. Mmmm... 
> > > Yes, the best solution would consist of a custom RS422 port for 
> the 
> > > PC which can even be externally clocked. But I'm not an 
> electronics 
> > > specialist so it will take a looooonnnnng time before I will 
end 
> up 
> > > with a working set :-)
> > > 
> > > ///E-Synthesist
> > > 
> > > --- In emax@yahoogroups.com, tu@ wrote:
> > > >
> > > > I am not sure about the Mac circuitry but the RS422 interface 
> on 
> > > the Emax should just be standard 
> > > > 9637 and 9638 RS422 buffers. The input threshold on the 9637 
> > > receiver is specified to be +/- 
> > > > 200mV so it should work with voltages higher than that. Do 
you 
> > have 
> > > an oscilloscope that you can 
> > > > use to probe the 9637 while it is receiving data? If so, you 
> > could 
> > > compare when receiving data 
> > > > from the Mac and the PC via RS422.
> > > > 
> > > > Its not a priority, but I think it would be worthwhile to 
have 
> an 
> > > RS422 interface that would allow 
> > > > any PC to be used for sample dumping to the Emax I, Emax II, 
> EII, 
> > > EIII and EIIIx as well as bank 
> > > > transfer with the EII and Emax. Even if an interface box cost 
> > some 
> > > money I feel there would be a 
> > > > demand given the numbers of these samplers still in use. The 
> Emu 
> > > world cannot live on old Macs 
> > > > alone :)
> > > > 
> > > > /Tristan
> > > > 
> > > > Monday, November 17, 2008, 3:24:57 AM, you wrote:
> > > > 
> > > > >
> > > > After some additional testing I'm pretty sure the problems 
are 
> > not 
> > > > caused by timing differences, but by voltage levels. 
> > > > I received a PCMCIA RS422 port this week, and this thing has 
> even 
> > > > more problems with communicating with the EII and the Emax 
than 
> > my 
> > > > USB/RS422 converter device. And again the communication 
problem 
> > is 
> > > to 
> > > > be found in the PC->Emax transmit part, not in the receive 
part.
> > > > I mentioned before that the Mac RS422 is sending very high 
> signal 
> > > > levels (higher than "officially" allowed by the RS422 
> standard). 
> > > The 
> > > > Emu samplers seem to rely on these high signals.
> > > > Conclusion: I give up the current experiments. Perhaps some 
> time 
> > in 
> > > > the future I'll try to make a device based on Mac circuits...
> > > > 
> > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > >
> > > > > Ok, that is interesting.
> > > > > 
> > > > > An alternative to direct connection of the RS422 to the PC 
> > would 
> > > be 
> > > > a microcontroller sitting 
> > > > > between the PC and sampler. I think someone suggested that 
> > > before. 
> > > > It could respond to the 
> > > > > sampler with tight timing but handle the loose timing over 
> the 
> > PC 
> > > > connection. I guess the PC side 
> > > > > could be implemented with either RS-232 or USB. But 
obviously 
> > USB 
> > > > would require a lot more 
> > > > > coding than simply translating RS422 and RS232 port 
protocols 
> > > with 
> > > > a bit of buffering in between.
> > > > > 
> > > > > /Tristan
> > > > > 
> > > > > Wednesday, November 12, 2008, 1:15:37 AM, you wrote:
> > > > > 
> > > > > >
> > > > > Yes it's about the same concept as on the EII: taking an 
> exact 
> > > dump 
> > > > > of the internal Emax memory at 500 kbaud in both 
directions. 
> Or 
> > > in 
> > > > > other words... transferring an EMX file across the serial 
> line 
> > > > > (except for the EMX 39 byte header string of course).
> > > > > 
> > > > > But there are two major drawbacks compared with the EII: 
> > > > > 1/ the Emax uses the MMA standard to accomplish this dump, 
> > > meaning 
> > > > > that the data is sent in packets of 120 bytes instead of 
256 
> > > bytes, 
> > > > > which is slower.
> > > > > 2/ it's not possible to dump specific memory segments, the 
> > whole 
> > > > > thing must be dumped in one sequential loop from the very 
> > > beginning 
> > > > > (position 0) to the very end (position 552959). 
> > > > > 
> > > > > The second one is a BIG problem: it means that if something 
> > goes 
> > > > > wrong (like a bad packet) the whole dump must be restarted.
> > > > > And... since the PC RS422 communication line with the Emax 
is 
> > not 
> > > > > optimal, this kind of error will for sure occur during a 
bank 
> > > > > transfer. On the EII, this means simply re-asking for the 
> > > > particular 
> > > > > bad data packet, but on the Emax you have to start all over 
> > again.
> > > > > 
> > > > > In practice this means that a full load/unload is simply 
not 
> > > > possible 
> > > > > with my current hardware (USB-RS422 and USB-RS232 
converters 
> of 
> > > all 
> > > > > kinds) because the loop is restarted endlessly. At the end 
of 
> > the 
> > > > > week I'll try an non-USB port device, I hope that one will 
> work.
> > > > > If not, a custom RS422 PC port must be built for the 
> Emax/EII, 
> > > > based 
> > > > > on the RS422 circuits & ICs of the Mac.
> > > > > 
> > > > > ///E-Synthesist
> > > > > 
> > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > >
> > > > > > Fantastic! So, is it the same method that the EII uses 
for 
> > bank 
> > > > > transfer or something else? Is there 
> > > > > > any chance you could document the protocol? 
> > > > > > 
> > > > > > I think 25-30 seconds should be acceptable for Emax I 
bank 
> > > loads. 
> > > > > At least it provides an option 
> > > > > > for those who can't or don't want to add SCSI. 
> > > > > > 
> > > > > > The Emax II load time does sound a bit slow. But it might 
> > still 
> > > > be 
> > > > > of use if someone had a working 
> > > > > > Emax II with a dead SCSI chip.
> > > > > > 
> > > > > > Out of interest, can the Emax II directly load an Emax I 
> bank 
> > > > (with 
> > > > > compressed 8 bit samples) in 
> > > > > > this way? 
> > > > > > 
> > > > > > /Tristan
> > > > > > 
> > > > > > Tuesday, November 11, 2008, 3:04:25 AM, you wrote:
> > > > > > 
> > > > > > >
> > > > > > After some experiments during the weekend, the current 
> status 
> > > of 
> > > > my 
> > > > > > little RS422 project is that I know how to do *fast* bank 
> > > > > > loads/unloads on the Emax via RS422. 
> > > > > > This should reduce the total data transfer time to 25-30 
> > > seconds 
> > > > on 
> > > > > > the Emax-I instead of the 2-3 minutes of Alchemy. Most 
> > probably 
> > > > > this 
> > > > > > was also the total load time of the OMI CDS3 system, 
which 
> > is - 
> > > > > let's 
> > > > > > say - "acceptable"... 
> > > > > > That's about the same speed as loading from a floppy :-) 
> but 
> > > the 
> > > > > > biggest advantage would be that one would have immediate 
> > access 
> > > > to 
> > > > > > hundreds of banks on the PC harddrive instead of having 
to 
> > copy 
> > > > > > individual banks to floppy disks first... 
> > > > > > Still SCSI is a much better alternative... for those 
having 
> a 
> > > > rev2 
> > > > > or 
> > > > > > rev3 board, and for those using the Emax-II. BTW at RS422 
> > > speed, 
> > > > > the 
> > > > > > data transfer time on a fully loaded Emax-II Turbo 8M 
would 
> > be 
> > > > > about 
> > > > > > 7 minutes :-). Fortunately every Emax-II is equipped with 
> > SCSI.
> > > > > > 
> > > > > > I have to write some decent software now which supports 
the 
> > > full 
> > > > > Emax 
> > > > > > handshaking protocol. But I'm pretty sure that the USB<--
> > >RS422 
> > > > > > converters will not be the best solution for this 
> > > communication - 
> > > > > > just like with the EII the communication seems to be 
quite 
> > > > > unreliable 
> > > > > > when transmitting data from the PC to the Emax, as a 
> > > consequence 
> > > > > the 
> > > > > > total transfer time increases dramatically due to 
> handshaking 
> > > > > > overhead. 
> > > > > > At the end of the week I will have a PCCard RS422 port on 
> my 
> > > > > laptop. 
> > > > > > This piece of hardware does not suffer from USB latency, 
so 
> I 
> > > > hope 
> > > > > it 
> > > > > > will work better...
> > > > > > 
> > > > > > ///E-Synthesist
> > > > > > 
> > > > > > --- In emax@yahoogroups.com, "esynthesist" <esynthesist@> 
> > wrote:
> > > > > > >
> > > > > > > Yes, I was also thinking there must be some dedicated 
> > command 
> > > > > (set) 
> > > > > > > for fast load/unload. But the fact that John remembered 
a 
> > > load 
> > > > > time 
> > > > > > > of 5 minutes for the OMI cdroms made me doubt again... 
On 
> > the 
> > > > > other 
> > > > > > > hand it is true that OMI cdroms could only be used 
after 
> > the 
> > > > > > release 
> > > > > > > of OS 3.2, so this is indeed an indication that 
> additional 
> > > > > commands 
> > > > > > > have been added, or at least some changes have been 
> > applied. 
> > > I 
> > > > > also 
> > > > > > > observed that the v 3.2 MIDI protocol is not 100% 
> behaving 
> > as 
> > > > > > > described in the v 3.0 document, e.g. the timeout 
> handling 
> > is 
> > > > > > > different. So there are also changes in the 'normal' 
> > > SYSEX/MMA 
> > > > > > > protocol.
> > > > > > > By the way: the OMI drive also required a firmware 
update 
> > in 
> > > > > order 
> > > > > > to 
> > > > > > > be compatible with the Emax. Question is of course 
> whether 
> > > this 
> > > > > was 
> > > > > > > just a small firmware update (to support the newly 
added 
> > > > commands 
> > > > > > in 
> > > > > > > the Emax OS) or a huge piece of Emax-specific code (to 
> > > > implement 
> > > > > > the 
> > > > > > > full SYSEX/MMA command set - which is indeed quite 
> > > unlikely) ...
> > > > > > > 
> > > > > > > The Emax-II and EIII indeed have a filesystem which is 
> > > > optimized 
> > > > > > for 
> > > > > > > handling different banksizes; I have the specs here 
> because 
> > I 
> > > > > > needed 
> > > > > > > them for EMXP. The EII and Emax are using filesystems 
> with 
> > > > fixed 
> > > > > > > filesizes in a sequential order.
> > > > > > > 
> > > > > > > Since I don't have any Emax OMI cdrom disk I'm not even 
> > sure 
> > > > > > whether 
> > > > > > > the banks on these disks are "EMX-like" 8-bit images or 
> > > > expanded 
> > > > > 12 
> > > > > > > bit images. It makes sense that they are 8-bit, because 
> > this 
> > > > > > allowed 
> > > > > > > OMI to put more banks on a CD, to transfer them faster 
to 
> > the 
> > > > > Emax 
> > > > > > > (if EII-like commands have been implemented in the Emax 
> OS 
> > of 
> > > > > > course) 
> > > > > > > and to use the same bank layout as on the Emax floppy 
and 
> > > Emax 
> > > > > > > harddisk banks.
> > > > > > > 
> > > > > > > So despite the "5 minutes load time" note from John, I 
> > think 
> > > we 
> > > > > can 
> > > > > > > still assume that there is some specific command set in 
> > V3.2 
> > > > > which 
> > > > > > > enables fast bank loads. I will try to find them out 
> during 
> > > the 
> > > > > > > weekend, either by experimenting or by looking into the 
> OS 
> > > > > > > binary/disassembled code...
> > > > > > > 
> > > > > > > ///E-Synthesist
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > > > >
> > > > > > > > 
> > > > > > > > Thursday, November 6, 2008, 4:23:43 AM, you wrote:
> > > > > > > > 
> > > > > > > > >
> > > > > > > > But the 5 minutes load time may have been reality...
> > > > > > > > 
> > > > > > > > This can explain why I don't know anyone and find no 
> > > > reference 
> > > > > at 
> > > > > > > all 
> > > > > > > > of anyone who actually used this CD-ROM drive with 
the 
> > > Emax. 
> > > > If 
> > > > > > > this 
> > > > > > > > 5 minutes load time is true, this must have resulted 
in 
> a 
> > > > > > > commercial 
> > > > > > > > failure for OMI when they launched the Emax OMI cd 
> > disks... 
> > > > but 
> > > > > > > they 
> > > > > > > > probably released these disks also in Mac/SD format ?
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Yes, such a slow load time would have been a major 
> > > marketing 
> > > > > > > problem. I find it difficult to imagine that Emu would 
> not 
> > > have 
> > > > > > added 
> > > > > > > the small amount of 
> > > > > > > > extra code required to load in a bank quickly via 
> RS422. 
> > If 
> > > > > they 
> > > > > > > wanted to sell Emaxes then surely there was a strong 
> > > incentive 
> > > > to 
> > > > > > > make the sound 
> > > > > > > > library efficient to use. I suspect the OMI CDROM 
> system 
> > > for 
> > > > > the 
> > > > > > > Emax was not a major market success because of the 
cost. 
> > The 
> > > > OMI 
> > > > > > > CDROM drive, or 
> > > > > > > > even a Mac with a CDROM drive, would have cost a 
> > > significant 
> > > > > > > proportion of the cost of an Emax. The average musician 
> > > > probably 
> > > > > > > would not have been 
> > > > > > > > able to justify that additional expense. Particularly 
> so 
> > > > given 
> > > > > > that 
> > > > > > > early CDROM drives were rather fragile.
> > > > > > > > 
> > > > > > > > >
> > > > > > > > 
> > > > > > > > And yes, Emu has done strange things. E.g. the EII 
> cdrom 
> > > kit 
> > > > > > > > supported a "folder" or "category" system: the banks 
on 
> a 
> > > > disk 
> > > > > > > could 
> > > > > > > > be put in folders (like bank "piano" in 
> folder "acoustic 
> > > > > > > keyboards") 
> > > > > > > > to make navigation much easier. This feature was not 
> > > > available 
> > > > > on 
> > > > > > > the 
> > > > > > > > Emax and EIII harddisks. Maybe Emu considered this to 
> be 
> > a 
> > > > > > feature 
> > > > > > > of 
> > > > > > > > OMI and not of Emu themselves, but they could have 
> > learned 
> > > > from 
> > > > > > > > that...
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Surely the category organisation was only a feature 
of 
> > the 
> > > > OMI 
> > > > > > > CDROM system, as the EII had no control over it. So it 
> was 
> > > > OMI's 
> > > > > > > CDROM format, not 
> > > > > > > > Emu's format. But this also gave OMI the flexibility 
to 
> > put 
> > > > as 
> > > > > > many 
> > > > > > > banks on the disk as they wanted and to organise them 
as 
> > they 
> > > > > > wanted. 
> > > > > > > There was 
> > > > > > > > no restriction on how OMI could do this as long as 
they 
> > > could 
> > > > > > serve 
> > > > > > > up the full memory image of each bank to the EII via 
the 
> > > RS422 
> > > > > port 
> > > > > > > when required.
> > > > > > > > 
> > > > > > > > Don't the Emax and the EII hard disk formats allocate 
a 
> > > fixed 
> > > > > > > number of banks for the disk? I believe you cannot fit 
> any 
> > > more 
> > > > > > banks 
> > > > > > > on the disk even if 
> > > > > > > > the existing banks are only half full of samples. 
> > > Presumably 
> > > > > this 
> > > > > > > is because the Emax and EII use a fixed memory size for 
> > each 
> > > > bank 
> > > > > > and 
> > > > > > > the complete 
> > > > > > > > data for the bank is copied directly between memory 
and 
> > > disk 
> > > > > when 
> > > > > > > you load or save a bank. Each hard disk bank is a the 
> > > > equivalent 
> > > > > of 
> > > > > > > one floppy disk 
> > > > > > > > image minus the OS data. I believe the Emax II and 
EIII 
> > use 
> > > > > > > variable sized banks. Therefore the number of banks 
> stored 
> > on 
> > > a 
> > > > > > hard 
> > > > > > > disk or CDROM 
> > > > > > > > depends on how much data is contained in each bank. 
But 
> I 
> > > > > believe 
> > > > > > > there is still a limit of 100 banks per disk. 
> > > > > > > > 
> > > > > > > > >
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > RS422 Communication with the Emulator was designed 
> based 
> > on 
> > > > > > > following 
> > > > > > > > key principles:
> > > > > > > > - all communication, including request/reply for 
> > parameter 
> > > > > > changes, 
> > > > > > > > occurs at 500 Kbaud
> > > > > > > > - a whole bank can be downloaded/loaded with one 
> special 
> > > > > designed 
> > > > > > > > type of command (a command which actually directly 
> > > > reads/writes 
> > > > > > the 
> > > > > > > > RAM memory segments in which the bank data is 
residing)
> > > > > > > > - bulk data load/unload occurs with data packets 
sized 
> > 256 
> > > > > bytes, 
> > > > > > > of 
> > > > > > > > which each byte represents 1 sample point (data is 
> > > > transferred 
> > > > > in 
> > > > > > > > compressed format)
> > > > > > > > 
> > > > > > > > On the Emax, they seem to have decided that choosing 
> for 
> > a 
> > > > > > > *standard* 
> > > > > > > > medium speed protocol was more important than 
choosing 
> > for 
> > > a 
> > > > > > > > *proprietary* high speed protocol. So they went for 
the 
> > > MIDI 
> > > > > > > > SYSES/MMA approach:
> > > > > > > > - all basic communication, including all 
> > > > commands/instructions, 
> > > > > > > > occurs at 31.25 Kbaud, no matter if the DIN5 MIDI 
> sockets 
> > > or 
> > > > > the 
> > > > > > > DB9 
> > > > > > > > RS422 port are being used.
> > > > > > > > - loading/unloading banks requires the full set of 
> SYSEX 
> > > > > > commands. 
> > > > > > > > Hence to simply download the parameters of just one 
> voice 
> > > of 
> > > > > just 
> > > > > > > one 
> > > > > > > > preset, already multiple commands must be exchanged 
> with 
> > > the 
> > > > > > Emax. 
> > > > > > > > This is due to the fact that in general only one 
> > parameter 
> > > > can 
> > > > > be 
> > > > > > > > transferred per command. And this must be done at the 
> > slow 
> > > > > 31.25 
> > > > > > > > Kbaud speed...mmmm...
> > > > > > > > - bulk data (sample) load/unload occurs with data 
> packets 
> > > > sized 
> > > > > > > only 
> > > > > > > > 120 bytes (MMA standard). Moreover each sample point 
> > > requires 
> > > > > 12 
> > > > > > > bits 
> > > > > > > > now instead of 8 bits on the EII since data is 
> > transferred 
> > > in 
> > > > > > > linear 
> > > > > > > > format instead of compressed format.
> > > > > > > > As a consequence, loading/unloading banks is much 
> slower 
> > > than 
> > > > > on 
> > > > > > > the 
> > > > > > > > EII. Of course, once they released the Emax-II, they 
> > would 
> > > > have 
> > > > > > > faced 
> > > > > > > > problems anyway. This machine could have up to 8MB 
> banks 
> > > and 
> > > > > > > doesn't 
> > > > > > > > use compression, so even at full 500 kbaud speed and 
> > using 
> > > > only 
> > > > > > one 
> > > > > > > > command - which is impossible in reality - the Emax-
II 
> > > would 
> > > > > > > require 
> > > > > > > > at least 2.7 minutes for loading/unloading banks. 
> > > Fortunately 
> > > > > > there 
> > > > > > > > was something invented called SCSI :-)
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Have a look at the MIDI spec for the Emax V3.0 
> software. 
> > > The 
> > > > > fast 
> > > > > > > (RS422) dumps use a protocol based on the MIDI SDS but 
> > > slightly 
> > > > > > > modified. The 
> > > > > > > > sample data is dumped as 12 bit linear but the 
samples 
> > are 
> > > > > packed 
> > > > > > > so that two 12 bit samples are transferred in three 8 
bit 
> > > > bytes. 
> > > > > It 
> > > > > > > is also of note that 
> > > > > > > > sending 8 bit wide data in this way violates the MIDI 
> > > > standard, 
> > > > > > as 
> > > > > > > bit7 is always reserved as an indicator of a status 
byte. 
> > Of 
> > > > > course 
> > > > > > > this is not really an 
> > > > > > > > issue here as the 500k baud RS422 data is only being 
> > > > > transferred 
> > > > > > > to/from the Emax so no other MIDI devices will ever see 
> > this 
> > > > > > > violation of the 
> > > > > > > > standard. But the outcome is that dumping samples as 
12 
> > bit 
> > > > > only 
> > > > > > > takes 50% longer than dumping as 8 bit compressed. 
Doing 
> a 
> > > > proper 
> > > > > > > MIDI SDS dump 
> > > > > > > > of 8 bit or 12 bit data actually takes the same 
amount 
> of 
> > > > time 
> > > > > as 
> > > > > > > only 7 data bits can be transferred for each byte in 
the 
> > > > message. 
> > > > > > So 
> > > > > > > an 8 bit dump 
> > > > > > > > takes two bytes per sample (7 + 1) while a 12 bit 
dump 
> > also 
> > > > > > > requires two bytes per sample (7 + 5). 16 bit dumps are 
> > even 
> > > > > slower 
> > > > > > > as they require three 
> > > > > > > > bytes per sample (7 + 7 + 2).
> > > > > > > > 
> > > > > > > > As you have said, the failure to provide a means of 
> > > directly 
> > > > > > > transferring banks into memory via RS422 seems to be 
the 
> > > > problem 
> > > > > in 
> > > > > > > the Emax, at least as 
> > > > > > > > documented in the V3.0 MIDI spec. But if the V3.0 
spec 
> > > > already 
> > > > > > > provides all the functions required to load banks from 
> the 
> > > > CDROM 
> > > > > > > drive using MIDI 
> > > > > > > > SYSEX and RS422, then why is V3.2 or the SE software 
> > > claimed 
> > > > to 
> > > > > > add 
> > > > > > > OMI CDROM support? It still seems likely to me that 
some 
> > > extra 
> > > > > > > functions were 
> > > > > > > > added in those versions to support fast bank loading 
> via 
> > > > RS422. 
> > > > > > If 
> > > > > > > not, then the OMI CDROM drive would have to be 
converting 
> > the 
> > > 8 
> > > > > bit 
> > > > > > > compressed 
> > > > > > > > sample data on the CDROM to 12 bit linear in order to 
> > dump 
> > > > the 
> > > > > > > samples into the Emax. The Emax would then have to 
> convert 
> > > the 
> > > > 12 
> > > > > > bit 
> > > > > > > linear samples 
> > > > > > > > back to compressed 8 bit samples. The transfer of 
> samples 
> > > > would 
> > > > > > > also take 50% longer for 12 bit linear compared to 8 
bit 
> > > > > > compressed. 
> > > > > > > And of course 
> > > > > > > > there would be no way for sequencer data included in 
> the 
> > > bank 
> > > > > to 
> > > > > > be 
> > > > > > > loaded into the Emax. I could be wrong, but it just 
seems 
> > > > > unlikely 
> > > > > > > Emu would have 
> > > > > > > > made it so difficult when a small software update to 
> the 
> > > Emax 
> > > > > > could 
> > > > > > > make bank dumping work in much the same way as the EII.
> > > > > > > > 
> > > > > > > > >
> > > > > > > > 
> > > > > > > > Nevertheless I will still do some experiments to find 
> out 
> > > if 
> > > > > the 
> > > > > > > Emax 
> > > > > > > > OS doesn't have any "fast bank load" commands... 
> > > > > > > > By the way: does anyone know whether the binary code 
of 
> > the 
> > > > > Emax 
> > > > > > OS 
> > > > > > > > can easily be de-compiled/disassembled in some way in 
> > order 
> > > > to 
> > > > > > get 
> > > > > > > > some kind of source code ? Is a simple Z80 
disassembler 
> > > > > > sufficient ?
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Unfortunately it seems the only way is to experiment 
> and 
> > > see 
> > > > > what 
> > > > > > > can be uncovered. The Emax NS32000 main CPU code can be 
> > > > > > disassembled 
> > > > > > > but it is 
> > > > > > > > not a common processor. The hard part of analyzing 
the 
> > > > > > disassembled 
> > > > > > > code is working out where the program and data begins 
and 
> > > ends 
> > > > as 
> > > > > > > well as what 
> > > > > > > > interrupt routines are being handled at runtime and 
how 
> > > they 
> > > > > > > interact. You would need to combine together the code 
> from 
> > > the 
> > > > > disk 
> > > > > > > OS image and the 
> > > > > > > > EPROM into a processor memory map. Various hardware 
> > > > peripherals 
> > > > > > > will also probably exist at certain addresses in the 
> memory 
> > > > map. 
> > > > > To 
> > > > > > > pull it all 
> > > > > > > > together you will ideally have the circuit 
schematics, 
> > the 
> > > > > memory 
> > > > > > > map, CPU/chip documentation plus a detailed design 
> > > description 
> > > > of 
> > > > > > how 
> > > > > > > the system 
> > > > > > > > works. Often much of this data can be found in the 
> > product 
> > > > > > service 
> > > > > > > manual. Then you need to determine which routines are 
> > called 
> > > > when 
> > > > > > > MIDI/RS422 
> > > > > > > > interrupts are handled. Testing with a logic analyzer 
> > > probing 
> > > > > the 
> > > > > > > CPU would certainly make that easier.
> > > > > > > > 
> > > > > > > > /Tristan
> > > > > > > > 
> > > > > > > > >
> > > > > > > > 
> > > > > > > > 
> > > > > > > > ///E-Synthesist 
> > > > > > > > 
> > > > > > > > --- In emax@yahoogroups.com, tu@ wrote:
> > > > > > > > >
> > > > > > > > > That seems excessively slow, as the EII could load 
a 
> > > > similar 
> > > > > > > sized 
> > > > > > > > bank from the same CDROM 
> > > > > > > > > drive in 12 seconds. Its hard to imagine Emu would 
> not 
> > > have 
> > > > > > > > implemented a similar load time on 
> > > > > > > > > the Emax if all it took was adding a software 
> routine. 
> > > But 
> > > > > then 
> > > > > > > > again, stranger things have 
> > > > > > > > > happened...
> > > > > > > > > 
> > > > > > > > > /Tristan
> > > > > > > > > 
> > > > > > > > > Quoting John Silveria II <john@>:
> > > > > > > > > 
> > > > > > > > > > Somewhere, and I can't remember where, I read 
that 
Show quoted textHide quoted text
> > the 
> > > CD-
> > > > > Rom 
> > > > > > > > drive
> > > > > > > > > > took 
> > > > > > > > > > up to 5 minutes to load a bank. I wish I could 
> > remember 
> > > > > > where. 
> > > > > > > So
> > > > > > > > > > indeed 
> > > > > > > > > > it was not only as slow as typical SYSEX load, it 
> > could 
> > > > > > > actually 
> > > > > > > > take
> > > > > > > > > > 
> > > > > > > > > > longer.
> > > > > > > > > >
> > > >
> > >
> >
>

Re: [emax] Re: RS422 fun

2008-11-23 by tu@...

Don't lose heart. It looks like Julian may be able to put together a USB to synchronous RS422 port 
adapter which would solve this problem. If not, there various other options. 

In the mean time you still have the Mac itself as a cheap and cheerful solution :) You can buy a lot 
of old Macs for the price of one PC synchronous RS422 adapter!

/Tristan

Sunday, November 23, 2008, 8:05:13 PM, you wrote:

>
>>>here is one that will do what you want, on
configuring correctly and hooking up the right pins. but US$399 makes 
it
more expensive than an emax...
<<<

Oops. I'm getting depressed finding out that my s/h USD50 old Mac is 
equipped with two (!) serial ports capable of what one (!) new USD399 
one can do. And for that 50 dollars the Mac package also includes a 
computer with screen, keyboard, harddisk and floppy drive :-)
(ok, the Quatech will have more *serial* features, but still...)

So I guess the next step is custom building one, e.g. with 
experimental/evaluation boards or from scratch. 
Not my piece of cake...

I guess experimenting with the CTS/RTS signals also does not make 
sense anymore, right ? I thought it could be a way to keep the 
drifting under control... I guess not... 
And I'm still a bit afraid that it could damage my PC RS422 port 
since the RTS/CTS pins are expecting either positive or negative 
voltages but not a mixture of them. Or are those ports typically 
protected against this "abuse" ?

In the meanwhile I currently have an "almost perfect" setup in my 
studio: One Mac Classic, with an external ZIP drive and CDROM drive, 
is connected to both the Emax (printer port) and the Emulator II 
(modem port).
The only problem is that I can't run both Sound Designer for EII and 
Sound Designer for Emax at the same time due to memory restrictions. 
I was hoping my Powerbook 180 - which has also two serial ports - 
would be the solution, but this machine requires AppleTalk to be ON 
for communicating with the EII, which unfortunately disables the 
Printer port for the Emax.
Well... we're not living in a perfect world :-)
Maybe I will give each of the instruments its own Mac...

...until we have the ultimate PC solution of course (with 2 or more 
RS422 ports on it)

///E-Synthesist

--- In emax@yahoogroups.com, mr julian <jujulilianan@...> wrote:
>
> 
> those RTS(ready to send) and CTS(clear to send) +/-(differential 
pairs) 
> are two separate signals. neither of which is a clock. They're 
> handshaking signals, used to signal and control the data flow 
between 2 
> devices.
> 
> So if that's what you have on your RS422 ports, but nothing labeled 
> something like "clock in" or "clock I/O" you don't have any 
synchronous 
> comms compatible RS422.
> 
> It appears that without synchronous communication, the emax won't 
> work... after first posting about what you might need, I went and 
got 
> back my copy of the emax service manual, and it shows very clearly 
a 
> 500k signal going from the emax to the computer.
> 
> the issue here is, that with a different 500k clock on the 
receiver, you 
> can have the units basically appear to work. but no two 500k clocks 
are 
> exactly the same frequency - and here's the sticky bit - the emax 
needs 
> a long sustained transfer... so even if they start off in step, 
> eventually the timing of the devices moves so the receiver is out 
of 
> time with the transmitter, and you get a data error...sound 
familiar? 
> and because it appears that the emax kills a whole transfer on a 
data 
> error, once that happens, it's all over. if the EII has a more 
robust 
> protocol, it could run without synchronisation, and just re-
transmit a 
> failed packet whenever inevitable clock differences cause a problem.
> 
> I thought I had sent a link earlier to a card that would work, but 
on 
> double checking I hadn't.... must have looked it up when i was 
> investigation the PC side of synchronous RS422, but not sent the 
> link..... anyway - here is one that will do what you want, on 
> configuring correctly and hooking up the right pins. but US$399 
makes it 
> more expensive than an emax...
> http://www.quatech.com/catalog/rs422s_pcmcia.php
> I've just spent an hour or two looking around, and haven't found 
much 
> that will do what you need for a lot cheaper.....
> :-(
> 
> 
> Anyway.. I'm spending another few hours evaluating something else 
now.
> 
> I've had one of these sitting around at home for a while
> http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3879
> 
> And its a cold windy sunday afternoon here.
> I've been meaning to have a go at playing with that eval board with 
this 
> software for a while.
> http://www.fourwalledcubicle.com/MyUSB.php
> 
> I'm not sure if it's an option yet, but this could be the basis of 
a 
> solution for the problem. Especially if the issue isn't packet-
packet 
> timing, but is simply just an issue with serial data 
synchronisation...
> 
> 
> 
> 
> 
> esynthesist wrote:
> 
> >You made be thinking again.
> >
> >When I started my experiments I asked for some advice on serial 
> >communication on a Dutch electronics internet group. One of my 
> >questions was whether the 4 handshake signals on the standard 
RS422 
> >(RTS+, RTS-, CTS+, CTS-) can be compared in some way to the HSKi 
and 
> >HSKo signals of the Mac serial port. Specifically I was also 
asking 
> >what to do with the + and - signals, given the fact that the 
> >Emax/Emulator sends a clock signal which is going + and - on the 
same 
> >line, while the RS422 expects seperated opposite signals.
> >I also asked if an independent clock in the PC RS422, running at 
> >500kbaud would be sufficient, instead of external clocking. 
> >At the end the experts on this group confirmed that an independent 
> >clock should be OK, even if it's not clocking exactly at the same 
> >speed of the Emulator II and that phasing problems can be ignored.
> >One of the arguments they based their conclusion on was that the 
> >Emulator II communication protocol is *asynchronous* (as also 
stated 
> >in the technical documents of the EII).
> >Were they wrong ?
> >
> >And do you know the most appropriate wiring between the 4 
> >RS422 "clock" pins and the single clock pin of the Emax/Emulator 
II ?
Show quoted textHide quoted text
> >
> >Or do I understand you completely wrong, and are those "external 
> >clockable RS422 devices for the PC" not using these 4 signals but 
> >even another one ?
> >
> >By the way: what exact link to which RS422 device are you talking 
> >about ? I reviewed the messages but didn't find a direct link ?
> >
> >///E-Synthesist
> >
> > 
> >
>

Re: [emax] Re: RS422 fun

2008-11-24 by tu@...

Thanks, this protocol makes sense. No doubt Emu did it this way so they could reuse the SDS sample dump code. Can you confirm that the Emax 
always waits for an Ack/Nak before sending the next packet? This is important to know, as the buffering requirement is much lower if we can be sure a 
new packet will not arrive until after the last packet has been handled.

Its interesting you should mention the 31.25k/500k baud rate switching. The Emax UART must do this by selecting x1 or x16 clock divider mode in the 
UART. According to the schemtics, the 500kHz clock being sent out of the RS422 port and driving the Emax UART TX & RX does not change in 
frequency. A side effect of this is that when operating at 31.25k baud the Emax UART is actually working in asynchronous mode. Synchronous operation 
only happens when the x1 clock divider is used. Therefore the Mac is presumably doing the same thing at its end when switching between the baud 
rates.

You earlier reported that the Emax bank dump must be continuous with no resent packets. But I notice the MIDI SDS implementation in the Emax allows 
for up to 5 resends if a Nak is received for a particular packet. When your bank dump failed was this because of the RS422 clock synchronization 
problem? If so, it is likely any subsequent resends of the packet would also have failed and received a Nak. This leads me to suspect that with a working 
synchronous RS422 connection you probably could continue the dump by resending packets that returned a Nak from the Emax.

The easiest solution from your software perspective would be if you could have a USB serial port that supports synchronous RS422 connection to the 
Emax (or other Emu sampler). Then you handle the protocol, baud rate switching etc and you can use standard Windows drivers. This is presumably 
what the expensive commercial interfaces are offering and I presume this is what Julian is working on a low cost alternative to. Another option would be 
to have a microcontroller with a large buffer memory that the PC can read from and write to using whatever protocol and the microcontroller would 
handle the Emu sampler synchronous RS422 interface and protocols. Obviously this would be more work to develop the software for the microcontroller 
and possibly the drivers. 

Another possibility would be to have a micro controller with two serial interfaces, one to the PC (asynchronous RS422 or RS232) and one to the Emu 
sampler (synchronous RS422). The micro controller would just buffer and pass data between the two UARTs and switch baud rates (31.25k/500k) 
toward the Emu sampler if required. The PC host could connect via any off the shelf USB to RS232/RS422 adapter or use a built in or PCI serial port. 
Because of the flow control provided by the Ack/Nak messages, the PC serial connection could also use any baud rate the PC port supports. Although 
dumps would be slower at PC baud rates lower than 500kHz, this would make it widely compatible with any old PC you might happen to have lying 
around. Both the microcontroller software and hardware would be fairly simple for this option and no special drivers would be required. The Emax serial 
port even provides +5V that could be used to power the small interface board.

I would be very interested to have the option in EMXP to dump samples to and from the Emax (or other Emu RS422 equiped sampler) directly from wav 
files. Then it would be easy to take a sample, transfer it to the PC, edit on any PC editor that supports wav and then dump back to the sampler again. 
Do you have any plan to implement something like this in addition to bank transfers?

/Tristan

Monday, November 24, 2008, 2:30:34 AM, you wrote:

>
O yes, the protocol.
It's really simple in fact. It's based on MMA as it has been 
described in the MIDI SYSEX v3.0 docs of Emu.
It's just that the "Get Bank" and "Send Bank" SYSEX commands were 
missing in that document. Here they are:

1/ To send a bank from Emax to Host Computer:
- the host should send F0 18 02 09 F7 at 31.25kbaud to the Emax 
(Request to Send Bank Fast)
- the Emax will respond with F0 18 02 0F F7 at 31.25kbaud (Accept 
Bank Fast)
- then Emax switches to 500kbaud, and the host computer should do 
so too.
- from that point on the communication is exactly the same as the 
one described for Send Sample Fast: the host should send an initial 
ACK (F0 7E 0C 7F 00 F7) and then the data dump starts. The Emax sends 
MMA data packets (127 bytes containing 120 data bytes), and each 
packet should be ACKed by the host (F0 7E 0C 7F pp F7 with pp = 
packet number looping from 0x00 to 0xFF, then back to 0x00 again and 
so on).
- in total 4609 of these packet transmissions + ACKs should be done.

2/ To send a bank from Host Computer to Emax:
- the host should send F0 18 02 0F F7 at 31.25kbaud to the Emax 
(Accept Bank Fast)
- the Emax will immediately switch to 500kbaud and the host 
computer should do so too
- the Emax will send an ACK (if everything goes well) i.e. F0 7E 0C 
7F 00 F7
- then the host should start sending MMA packets, which will be 
ACKed by the Emax one after another (packets 00=0x00 to 127=0xFF and 
then again from 0x00)

That's about it.
To find this out, I simply tried the first undocumented SYSEX code 
(09) and I immediately had luck ! It seemed to be the command I was 
looking for.
Sniffing the communication between my Mac (Sound Designer for Emax) 
and the Emax confirms that this is the protocol that should be used.

Of course I want to add the RS422 load/unload features to EMXP, and 
was hoping to be able to use the standard Windows C serial 
communication library of Microsoft.
If some of you succeed in creating hardware for the RS422 it would be 
great that this library can be used. If some special hardware 
specific library must be used I can get in trouble with freeware 
licensing for EMXP... unless that library would be completely free 
also.

PS: the fact that the host must initiate the communication at 31.25 
kbaud and then has to switch to 500kbaud is something to think about 
when using external clocking. I suppose and hope that even this 31.25 
kbaud is clocked by the Emax to the Mac, so that the host doesn't 
have to change from internal clocking to external clocking all the 
time.

///E-Synthesist
--- In emax@yahoogroups.com, tu@... wrote:
>
> If the Emax bank dump protocol uses the same format as the MMA SDS 
data packet then each 
> packet only requires 127 bytes. That should not be too difficult to 
buffer.
> 
> If each packet requires a Ack/Nak reply then there is a built in 
flow control mechanism and no 
> RTS/CTS hardware flow control is required. 
> 
> Esynthesist, would it be possible for you to reveal a bit more 
detail about the bank dump protocol? 
> What goes in the headers etc?
> 
> /Tristan
> 
> Sunday, November 23, 2008, 9:01:15 PM, you wrote:
> 
> >
> 
> esynthesist wrote:
> 
> > Oops. I'm getting depressed finding out that my s/h USD50 old Mac 
is
> >
> >equipped with two (!) serial ports capable of what one (!) new 
USD399 
> >one can do. And for that 50 dollars the Mac package also includes 
a 
> >computer with screen, keyboard, harddisk and floppy drive :-)
> >(ok, the Quatech will have more *serial* features, but still...)
> > 
> >
> yeah.... modern computers move on from old tech, but then when you 
need 
> the simple old features of the old tech, they're no longer a 
standard 
> item, and you pay $$
> 
> >So I guess the next step is custom building one, e.g. with 
> >experimental/evaluation boards or from scratch. 
> >Not my piece of cake...
> > 
> >
> Well, I did some investigating, and got the basic RS232 adapter 
test 
> code up and working with serial loopback on my dev board, and read 
> through the manual about setting up the avr USART for synchronous 
> communication, which looks really simple... (though will have to 
build 
> some buffer circuits, and then do more testing running it in 
loopback, 
> while being externally clocked form the emax, before I can say 
it'll 
> even be approaching being a possibly being useful solution)
> 
> note: this will never work as well as a proper US$399 synchronous 
> interface, because it will be limited by whatever buffer size that 
can 
> be made in the AVR(which has only 8k of ram), after the USB stack 
and 
> the basic code takes everything it needs, but it's possible that 
maybe 
> with a bit of tweaking, it can be made to work well enough to send 
and 
> receive packets for the emax... as long as it's allowed to spend a 
bit 
> of time shuffling data to/from the PC between packets....
> 
> so - how big are the packets that the emax sends and receives, 
anyway??
> 
> >I guess experimenting with the CTS/RTS signals also does not make 
> >sense anymore, right ? I thought it could be a way to keep the 
> >drifting under control... I guess not... 
> > 
> >
> nope... sorry... it's the mechanism for either side of the comms 
pair to 
> say "hold up! I've had enough!!" to the other side, instead of just 
> overflowing and crapping out...
> 
> looking at my service manual again, I don't see CTS or RTS here 
> either.... just tx, rx, and clock. so I guess that's all we need, 
to 
> talk to the emax from a PC?
> 
> >And I'm still a bit afraid that it could damage my PC RS422 port 
> >since the RTS/CTS pins are expecting either positive or negative 
> >voltages but not a mixture of them. Or are those ports typically 
> >protected against this "abuse" ?
> > 
> >
> They are protected, to some degree.
> 
> btw, "+" and "-" do not refer to the voltage polarity of a balanced 
> signal, they refer to the logical polarity. in this case, I think 
you'll 
> find RS422 + and - parts of a signal are both always in the range 
of 0V 
> to 5V, but the "+" is 5V when the "-" is 0v, and the "-" is 5V when 
the 
> "+ is 0v....
>

Re: RS422 fun

2008-11-24 by esynthesist

Tristan,

Actually I only tried the Emax-->PC bank transfer, so I can't say 
anything about the other direction yet.
So concerning the Emax->PC transfer: in fact the Emax can live with 
the fact that no ACKs are being sent by the host. If no ACK (or data 
in general) is transmitted for about 55 msec, Emax seems to decide to 
send the next packet. Sounds great, but note that a bank transfer 
takes a lot of time this way (waiting for these ACKs will already 
take more than 4 minutes in total :-). But I was able to download 
banks this way, yes...
So why doesn't the Emax re-send the packet for max. 5 times ?
Because after initially sending the packet, the PC sends an ACK to 
the Emax which fails to arrive correctly on the Emax. The Emax 
replies immediately with a "Cancel Dump" message and on the Emax 
display the error "Aborted - Bad ACK received for packet XXXX".

You're right about the 31.25kbaud communication: this is indeed 
asynchronous, so it's relying on the internal clock. That means 
switching from internal to external clock for unloading/loading banks.

About your request to send/receive wavs between EMXP and the Emax: no 
problem, that can be done once we succeed in getting the hardware 
comms up and running ! 

///E-Synthesist



--- In emax@yahoogroups.com, tu@... wrote:
>
> Thanks, this protocol makes sense. No doubt Emu did it this way so 
they could reuse the SDS sample dump code. Can you confirm that the 
Emax 
> always waits for an Ack/Nak before sending the next packet? This is 
important to know, as the buffering requirement is much lower if we 
can be sure a 
> new packet will not arrive until after the last packet has been 
handled.
> 
> Its interesting you should mention the 31.25k/500k baud rate 
switching. The Emax UART must do this by selecting x1 or x16 clock 
divider mode in the 
> UART. According to the schemtics, the 500kHz clock being sent out 
of the RS422 port and driving the Emax UART TX & RX does not change 
in 
> frequency. A side effect of this is that when operating at 31.25k 
baud the Emax UART is actually working in asynchronous mode. 
Synchronous operation 
> only happens when the x1 clock divider is used. Therefore the Mac 
is presumably doing the same thing at its end when switching between 
the baud 
> rates.
> 
> You earlier reported that the Emax bank dump must be continuous 
with no resent packets. But I notice the MIDI SDS implementation in 
the Emax allows 
> for up to 5 resends if a Nak is received for a particular packet. 
When your bank dump failed was this because of the RS422 clock 
synchronization 
> problem? If so, it is likely any subsequent resends of the packet 
would also have failed and received a Nak. This leads me to suspect 
that with a working 
> synchronous RS422 connection you probably could continue the dump 
by resending packets that returned a Nak from the Emax.
> 
> The easiest solution from your software perspective would be if you 
could have a USB serial port that supports synchronous RS422 
connection to the 
> Emax (or other Emu sampler). Then you handle the protocol, baud 
rate switching etc and you can use standard Windows drivers. This is 
presumably 
> what the expensive commercial interfaces are offering and I presume 
this is what Julian is working on a low cost alternative to. Another 
option would be 
> to have a microcontroller with a large buffer memory that the PC 
can read from and write to using whatever protocol and the 
microcontroller would 
> handle the Emu sampler synchronous RS422 interface and protocols. 
Obviously this would be more work to develop the software for the 
microcontroller 
> and possibly the drivers. 
> 
> Another possibility would be to have a micro controller with two 
serial interfaces, one to the PC (asynchronous RS422 or RS232) and 
one to the Emu 
> sampler (synchronous RS422). The micro controller would just buffer 
and pass data between the two UARTs and switch baud rates 
(31.25k/500k) 
> toward the Emu sampler if required. The PC host could connect via 
any off the shelf USB to RS232/RS422 adapter or use a built in or PCI 
serial port. 
> Because of the flow control provided by the Ack/Nak messages, the 
PC serial connection could also use any baud rate the PC port 
supports. Although 
> dumps would be slower at PC baud rates lower than 500kHz, this 
would make it widely compatible with any old PC you might happen to 
have lying 
> around. Both the microcontroller software and hardware would be 
fairly simple for this option and no special drivers would be 
required. The Emax serial 
> port even provides +5V that could be used to power the small 
interface board.
> 
> I would be very interested to have the option in EMXP to dump 
samples to and from the Emax (or other Emu RS422 equiped sampler) 
directly from wav 
> files. Then it would be easy to take a sample, transfer it to the 
PC, edit on any PC editor that supports wav and then dump back to the 
sampler again. 
> Do you have any plan to implement something like this in addition 
to bank transfers?
> 
> /Tristan
> 
> Monday, November 24, 2008, 2:30:34 AM, you wrote:
> 
> >
> O yes, the protocol.
> It's really simple in fact. It's based on MMA as it has been 
> described in the MIDI SYSEX v3.0 docs of Emu.
> It's just that the "Get Bank" and "Send Bank" SYSEX commands were 
> missing in that document. Here they are:
> 
> 1/ To send a bank from Emax to Host Computer:
> - the host should send F0 18 02 09 F7 at 31.25kbaud to the Emax 
> (Request to Send Bank Fast)
> - the Emax will respond with F0 18 02 0F F7 at 31.25kbaud (Accept 
> Bank Fast)
> - then Emax switches to 500kbaud, and the host computer should do 
> so too.
> - from that point on the communication is exactly the same as the 
> one described for Send Sample Fast: the host should send an initial 
> ACK (F0 7E 0C 7F 00 F7) and then the data dump starts. The Emax 
sends 
> MMA data packets (127 bytes containing 120 data bytes), and each 
> packet should be ACKed by the host (F0 7E 0C 7F pp F7 with pp = 
> packet number looping from 0x00 to 0xFF, then back to 0x00 again 
and 
> so on).
> - in total 4609 of these packet transmissions + ACKs should be done.
> 
> 2/ To send a bank from Host Computer to Emax:
> - the host should send F0 18 02 0F F7 at 31.25kbaud to the Emax 
> (Accept Bank Fast)
> - the Emax will immediately switch to 500kbaud and the host 
> computer should do so too
> - the Emax will send an ACK (if everything goes well) i.e. F0 7E 0C 
> 7F 00 F7
> - then the host should start sending MMA packets, which will be 
> ACKed by the Emax one after another (packets 00=0x00 to 127=0xFF 
and 
> then again from 0x00)
> 
> That's about it.
> To find this out, I simply tried the first undocumented SYSEX code 
> (09) and I immediately had luck ! It seemed to be the command I was 
> looking for.
> Sniffing the communication between my Mac (Sound Designer for Emax) 
> and the Emax confirms that this is the protocol that should be used.
> 
> Of course I want to add the RS422 load/unload features to EMXP, and 
> was hoping to be able to use the standard Windows C serial 
> communication library of Microsoft.
> If some of you succeed in creating hardware for the RS422 it would 
be 
> great that this library can be used. If some special hardware 
> specific library must be used I can get in trouble with freeware 
> licensing for EMXP... unless that library would be completely free 
> also.
> 
> PS: the fact that the host must initiate the communication at 31.25 
> kbaud and then has to switch to 500kbaud is something to think 
about 
> when using external clocking. I suppose and hope that even this 
31.25 
> kbaud is clocked by the Emax to the Mac, so that the host doesn't 
> have to change from internal clocking to external clocking all the 
> time.
> 
> ///E-Synthesist
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > If the Emax bank dump protocol uses the same format as the MMA 
SDS 
> data packet then each 
> > packet only requires 127 bytes. That should not be too difficult 
to 
> buffer.
> > 
> > If each packet requires a Ack/Nak reply then there is a built in 
> flow control mechanism and no 
> > RTS/CTS hardware flow control is required. 
> > 
> > Esynthesist, would it be possible for you to reveal a bit more 
> detail about the bank dump protocol? 
> > What goes in the headers etc?
> > 
> > /Tristan
> > 
> > Sunday, November 23, 2008, 9:01:15 PM, you wrote:
> > 
> > >
> > 
> > esynthesist wrote:
> > 
> > > Oops. I'm getting depressed finding out that my s/h USD50 old 
Mac 
> is
> > >
> > >equipped with two (!) serial ports capable of what one (!) new 
> USD399 
> > >one can do. And for that 50 dollars the Mac package also 
includes 
> a 
> > >computer with screen, keyboard, harddisk and floppy drive :-)
> > >(ok, the Quatech will have more *serial* features, but still...)
> > > 
> > >
> > yeah.... modern computers move on from old tech, but then when 
you 
> need 
> > the simple old features of the old tech, they're no longer a 
> standard 
> > item, and you pay $$
> > 
> > >So I guess the next step is custom building one, e.g. with 
> > >experimental/evaluation boards or from scratch. 
> > >Not my piece of cake...
> > > 
> > >
> > Well, I did some investigating, and got the basic RS232 adapter 
> test 
> > code up and working with serial loopback on my dev board, and 
read 
> > through the manual about setting up the avr USART for synchronous 
> > communication, which looks really simple... (though will have to 
> build 
> > some buffer circuits, and then do more testing running it in 
> loopback, 
> > while being externally clocked form the emax, before I can say 
> it'll 
> > even be approaching being a possibly being useful solution)
> > 
> > note: this will never work as well as a proper US$399 synchronous 
> > interface, because it will be limited by whatever buffer size 
that 
> can 
> > be made in the AVR(which has only 8k of ram), after the USB stack 
> and 
> > the basic code takes everything it needs, but it's possible that 
> maybe 
> > with a bit of tweaking, it can be made to work well enough to 
send 
> and 
> > receive packets for the emax... as long as it's allowed to spend 
a 
> bit 
> > of time shuffling data to/from the PC between packets....
> > 
> > so - how big are the packets that the emax sends and receives, 
> anyway??
> > 
> > >I guess experimenting with the CTS/RTS signals also does not 
make 
> > >sense anymore, right ? I thought it could be a way to keep the 
> > >drifting under control... I guess not... 
> > > 
> > >
> > nope... sorry... it's the mechanism for either side of the comms 
> pair to 
> > say "hold up! I've had enough!!" to the other side, instead of 
just 
> > overflowing and crapping out...
> > 
> > looking at my service manual again, I don't see CTS or RTS here 
> > either.... just tx, rx, and clock. so I guess that's all we need, 
> to 
> > talk to the emax from a PC?
> > 
> > >And I'm still a bit afraid that it could damage my PC RS422 port 
> > >since the RTS/CTS pins are expecting either positive or negative 
> > >voltages but not a mixture of them. Or are those ports typically 
> > >protected against this "abuse" ?
> > > 
> > >
> > They are protected, to some degree.
> > 
> > btw, "+" and "-" do not refer to the voltage polarity of a 
balanced 
> > signal, they refer to the logical polarity. in this case, I think 
> you'll 
> > find RS422 + and - parts of a signal are both always in the range 
> of 0V 
> > to 5V, but the "+" is 5V when the "-" is 0v, and the "-" is 5V 
when 
Show quoted textHide quoted text
> the 
> > "+ is 0v....
> >
>

Re: [emax] Re: RS422 fun

2008-11-24 by mr julian

tu@... wrote:

>Thanks, this protocol makes sense. No doubt Emu did it this way so they could reuse the SDS sample dump code. Can you confirm that the Emax 
>always waits for an Ack/Nak before sending the next packet? This is important to know, as the buffering requirement is much lower if we can be sure a 
>new packet will not arrive until after the last packet has been handled.
>  
>
yeah..... that would make things really simple.
:-)

>A side effect of this is that when operating at 31.25k baud the Emax UART is actually working in asynchronous mode. Synchronous operation 
>only happens when the x1 clock divider is used. Therefore the Mac is presumably doing the same thing at its end when switching between the baud 
>rates.
>  
>
I'm pretty sure the mac would have to have it's own clock for 
asynchronous communication.

in asynchronous mode, the UART runs at much faster than baudrate speeds 
(say 500k for 31.25k data ??which is why the emax works fine at asynch 
31.25k with this as it's clock, still... ;-) and continually samples the 
serial data for the start bit. then when it's got a valid start bit, 
having detected the falling edge at the beginning,  it samples the rest 
of the bits in the middle, and confirms the final edge of the stop bit. 
all being good, the received byte is latched to the output.


>The easiest solution from your software perspective would be if you could have a USB serial port that supports synchronous RS422 connection to the 
>Emax (or other Emu sampler). Then you handle the protocol, baud rate switching etc and you can use standard Windows drivers. This is presumably 
>what the expensive commercial interfaces are offering and I presume this is what Julian is working on a low cost alternative to. 
>
yep!
:-)

basic solution if this works will be one $30 dev board, wired to a 
separate board with a couple of ICs. I will just veroboard the custom 
stuff for now, but if it works and a few people want one, can always get 
a batch of small PCBs made up for a few $.

if I can get away with a simple unchanged serial adapter, that would be 
amazing - otherwise I might have to put some smarts into my buffer that 
will make it only work with the emax (ie look for header info and 
deliberately hold off a packet retransmission to the emax until it has a 
whole one, etc etc - basically make it run off the actual data that 
comes through it...)

>Another option would be 
>to have a microcontroller with a large buffer memory that the PC can read from and write to using whatever protocol and the microcontroller would 
>handle the Emu sampler synchronous RS422 interface and protocols. Obviously this would be more work to develop the software for the microcontroller 
>and possibly the drivers. 
>  
>
yeah - would be best not to have to do that if at all possible.
also, half a MB of fast access RAM for buffering would be annoying to 
deal with hooking up on an 8 bit micro.

>Another possibility would be to have a micro controller with two serial interfaces, one to the PC (asynchronous RS422 or RS232) and one to the Emu 
>sampler (synchronous RS422). The micro controller would just buffer and pass data between the two UARTs and switch baud rates (31.25k/500k) 
>toward the Emu sampler if required. The PC host could connect via any off the shelf USB to RS232/RS422 adapter or use a built in or PCI serial port. 
>Because of the flow control provided by the Ack/Nak messages, the PC serial connection could also use any baud rate the PC port supports. Although 
>dumps would be slower at PC baud rates lower than 500kHz, this would make it widely compatible with any old PC you might happen to have lying 
>around. Both the microcontroller software and hardware would be fairly simple for this option and no special drivers would be required. The Emax serial 
>port even provides +5V that could be used to power the small interface board.
>  
>

A serial rate converter would be even simpler, but it would be nice to 
be able to have PC side running fast enough that there was no gaps 
between bytes in a packet, as seen by the emax.....

Re: RS422 fun

2008-11-24 by esynthesist

I hope you can create a device which is not restricted to the Emax ! 
If we could use the same device with the EII that would be awesome.

From a software developer's point of view, it would be really nice to 
have a device which can be instructed by software to:
- run with any supported internal clock rate (at least 31.25 kbaud 
which we really need)
- run with external clocking
- use X databits, Y stopbits and Z parity.
- (perhaps) use some timing parameters, like "max time between two 
bytes" (but I'm not sure we really need this)

That's all I want :-) and it would be the most flexible solution, 
capable of communicating with any Emu sampler supporting the RS422 
interface.

I hope I'm not dreaming ?
Crossing my fingers...
Good luck !

///E-Synthesist 

--- In emax@yahoogroups.com, mr julian <jujulilianan@...> wrote:
>
> 
> 
> tu@... wrote:
> 
> >Thanks, this protocol makes sense. No doubt Emu did it this way so 
they could reuse the SDS sample dump code. Can you confirm that the 
Emax 
> >always waits for an Ack/Nak before sending the next packet? This 
is important to know, as the buffering requirement is much lower if 
we can be sure a 
> >new packet will not arrive until after the last packet has been 
handled.
> >  
> >
> yeah..... that would make things really simple.
> :-)
> 
> >A side effect of this is that when operating at 31.25k baud the 
Emax UART is actually working in asynchronous mode. Synchronous 
operation 
> >only happens when the x1 clock divider is used. Therefore the Mac 
is presumably doing the same thing at its end when switching between 
the baud 
> >rates.
> >  
> >
> I'm pretty sure the mac would have to have it's own clock for 
> asynchronous communication.
> 
> in asynchronous mode, the UART runs at much faster than baudrate 
speeds 
> (say 500k for 31.25k data ??which is why the emax works fine at 
asynch 
> 31.25k with this as it's clock, still... ;-) and continually 
samples the 
> serial data for the start bit. then when it's got a valid start 
bit, 
> having detected the falling edge at the beginning,  it samples the 
rest 
> of the bits in the middle, and confirms the final edge of the stop 
bit. 
> all being good, the received byte is latched to the output.
> 
> 
> >The easiest solution from your software perspective would be if 
you could have a USB serial port that supports synchronous RS422 
connection to the 
> >Emax (or other Emu sampler). Then you handle the protocol, baud 
rate switching etc and you can use standard Windows drivers. This is 
presumably 
> >what the expensive commercial interfaces are offering and I 
presume this is what Julian is working on a low cost alternative to. 
> >
> yep!
> :-)
> 
> basic solution if this works will be one $30 dev board, wired to a 
> separate board with a couple of ICs. I will just veroboard the 
custom 
> stuff for now, but if it works and a few people want one, can 
always get 
> a batch of small PCBs made up for a few $.
> 
> if I can get away with a simple unchanged serial adapter, that 
would be 
> amazing - otherwise I might have to put some smarts into my buffer 
that 
> will make it only work with the emax (ie look for header info and 
> deliberately hold off a packet retransmission to the emax until it 
has a 
> whole one, etc etc - basically make it run off the actual data that 
> comes through it...)
> 
> >Another option would be 
> >to have a microcontroller with a large buffer memory that the PC 
can read from and write to using whatever protocol and the 
microcontroller would 
> >handle the Emu sampler synchronous RS422 interface and protocols. 
Obviously this would be more work to develop the software for the 
microcontroller 
> >and possibly the drivers. 
> >  
> >
> yeah - would be best not to have to do that if at all possible.
> also, half a MB of fast access RAM for buffering would be annoying 
to 
> deal with hooking up on an 8 bit micro.
> 
> >Another possibility would be to have a micro controller with two 
serial interfaces, one to the PC (asynchronous RS422 or RS232) and 
one to the Emu 
> >sampler (synchronous RS422). The micro controller would just 
buffer and pass data between the two UARTs and switch baud rates 
(31.25k/500k) 
> >toward the Emu sampler if required. The PC host could connect via 
any off the shelf USB to RS232/RS422 adapter or use a built in or PCI 
serial port. 
> >Because of the flow control provided by the Ack/Nak messages, the 
PC serial connection could also use any baud rate the PC port 
supports. Although 
> >dumps would be slower at PC baud rates lower than 500kHz, this 
would make it widely compatible with any old PC you might happen to 
have lying 
> >around. Both the microcontroller software and hardware would be 
fairly simple for this option and no special drivers would be 
required. The Emax serial 
> >port even provides +5V that could be used to power the small 
interface board.
> >  
> >
> 
> A serial rate converter would be even simpler, but it would be nice 
to 
Show quoted textHide quoted text
> be able to have PC side running fast enough that there was no gaps 
> between bytes in a packet, as seen by the emax.....
>

Re: [emax] Re: RS422 fun

2008-11-24 by Julian

what you want is probably doable. It's definately do-able with the AVR,
but my issue is the PC driver side, and modifying or creating a driver
to send all the extra configuration instructions.

How about we try and see what we can do with a hard coded emax version,
and then see what we can do for the EII later?

that would be a great excuse for me to get an Eii......
:-P




On Mon, 24 Nov 2008 22:12:14 -0000, "esynthesist"
<esynthesist@...> said:
> I hope you can create a device which is not restricted to the Emax ! 
> If we could use the same device with the EII that would be awesome.
> 
> From a software developer's point of view, it would be really nice to 
> have a device which can be instructed by software to:
> - run with any supported internal clock rate (at least 31.25 kbaud 
> which we really need)
> - run with external clocking
> - use X databits, Y stopbits and Z parity.
> - (perhaps) use some timing parameters, like "max time between two 
> bytes" (but I'm not sure we really need this)
> 
> That's all I want :-) and it would be the most flexible solution, 
> capable of communicating with any Emu sampler supporting the RS422 
> interface.
> 
> I hope I'm not dreaming ?
> Crossing my fingers...
> Good luck !
> 
> ///E-Synthesist 
> 
> --- In emax@yahoogroups.com, mr julian <jujulilianan@...> wrote:
> >
> > 
> > 
> > tu@... wrote:
> > 
> > >Thanks, this protocol makes sense. No doubt Emu did it this way so 
> they could reuse the SDS sample dump code. Can you confirm that the 
> Emax 
> > >always waits for an Ack/Nak before sending the next packet? This 
> is important to know, as the buffering requirement is much lower if 
> we can be sure a 
> > >new packet will not arrive until after the last packet has been 
> handled.
> > >  
> > >
> > yeah..... that would make things really simple.
> > :-)
> > 
> > >A side effect of this is that when operating at 31.25k baud the 
> Emax UART is actually working in asynchronous mode. Synchronous 
> operation 
> > >only happens when the x1 clock divider is used. Therefore the Mac 
> is presumably doing the same thing at its end when switching between 
> the baud 
> > >rates.
> > >  
> > >
> > I'm pretty sure the mac would have to have it's own clock for 
> > asynchronous communication.
> > 
> > in asynchronous mode, the UART runs at much faster than baudrate 
> speeds 
> > (say 500k for 31.25k data ??which is why the emax works fine at 
> asynch 
> > 31.25k with this as it's clock, still... ;-) and continually 
> samples the 
> > serial data for the start bit. then when it's got a valid start 
> bit, 
> > having detected the falling edge at the beginning,  it samples the 
> rest 
> > of the bits in the middle, and confirms the final edge of the stop 
> bit. 
> > all being good, the received byte is latched to the output.
> > 
> > 
> > >The easiest solution from your software perspective would be if 
> you could have a USB serial port that supports synchronous RS422 
> connection to the 
> > >Emax (or other Emu sampler). Then you handle the protocol, baud 
> rate switching etc and you can use standard Windows drivers. This is 
> presumably 
> > >what the expensive commercial interfaces are offering and I 
> presume this is what Julian is working on a low cost alternative to. 
> > >
> > yep!
> > :-)
> > 
> > basic solution if this works will be one $30 dev board, wired to a 
> > separate board with a couple of ICs. I will just veroboard the 
> custom 
> > stuff for now, but if it works and a few people want one, can 
> always get 
> > a batch of small PCBs made up for a few $.
> > 
> > if I can get away with a simple unchanged serial adapter, that 
> would be 
> > amazing - otherwise I might have to put some smarts into my buffer 
> that 
> > will make it only work with the emax (ie look for header info and 
> > deliberately hold off a packet retransmission to the emax until it 
> has a 
> > whole one, etc etc - basically make it run off the actual data that 
> > comes through it...)
> > 
> > >Another option would be 
> > >to have a microcontroller with a large buffer memory that the PC 
> can read from and write to using whatever protocol and the 
> microcontroller would 
> > >handle the Emu sampler synchronous RS422 interface and protocols. 
> Obviously this would be more work to develop the software for the 
> microcontroller 
> > >and possibly the drivers. 
> > >  
> > >
> > yeah - would be best not to have to do that if at all possible.
> > also, half a MB of fast access RAM for buffering would be annoying 
> to 
> > deal with hooking up on an 8 bit micro.
> > 
> > >Another possibility would be to have a micro controller with two 
> serial interfaces, one to the PC (asynchronous RS422 or RS232) and 
> one to the Emu 
> > >sampler (synchronous RS422). The micro controller would just 
> buffer and pass data between the two UARTs and switch baud rates 
> (31.25k/500k) 
> > >toward the Emu sampler if required. The PC host could connect via 
> any off the shelf USB to RS232/RS422 adapter or use a built in or PCI 
> serial port. 
> > >Because of the flow control provided by the Ack/Nak messages, the 
> PC serial connection could also use any baud rate the PC port 
> supports. Although 
> > >dumps would be slower at PC baud rates lower than 500kHz, this 
> would make it widely compatible with any old PC you might happen to 
> have lying 
> > >around. Both the microcontroller software and hardware would be 
> fairly simple for this option and no special drivers would be 
> required. The Emax serial 
> > >port even provides +5V that could be used to power the small 
> interface board.
> > >  
> > >
> > 
> > A serial rate converter would be even simpler, but it would be nice 
> to 
> > be able to have PC side running fast enough that there was no gaps 
> > between bytes in a packet, as seen by the emax.....
> >
> 
> 
> 
> ------------------------------------
> 
> Emax and Emax II User's Group Website
> 
> http://www.silveriafamily.comYahoo! Groups Links
> 
> 
> 
-- 
http://bleepin.com

-- 
http://www.fastmail.fm - Same, same, but different...

Re: RS422 fun

2008-11-25 by esynthesist

OK :-)
What are the parameters that *can* be changed with the standard 
driver ? Nothing ??? Isn't it possible to define parity, or clocking 
by software? If this is true, how can you change these parameters 
then ? I'm not sure I understand.

I mean: as soon as I can write a piece of C-code (based on sample 
code provided by you of course ;-), which uses the standard USB 
driver library, but which contains specific Emax code, that's fine 
for me; then it's just a matter of writing another piece of code for 
each Emu sampler we want to support. I was not hoping for more.
But if the *hardware itself* is built in such a way that it only 
supports the Emax, then we would need another piece of hardware for 
the Emulator II, and that would be a shame...

But I guess it will all be software-driven, right ?

///E-Synthesist 

--- In emax@yahoogroups.com, "Julian" <jujulilianan@...> wrote:
>
> what you want is probably doable. It's definately do-able with the 
AVR,
> but my issue is the PC driver side, and modifying or creating a 
driver
> to send all the extra configuration instructions.
> 
> How about we try and see what we can do with a hard coded emax 
version,
> and then see what we can do for the EII later?
> 
> that would be a great excuse for me to get an Eii......
> :-P
> 
> 
> 
> 
> On Mon, 24 Nov 2008 22:12:14 -0000, "esynthesist"
> <esynthesist@...> said:
> > I hope you can create a device which is not restricted to the 
Emax ! 
> > If we could use the same device with the EII that would be 
awesome.
> > 
> > From a software developer's point of view, it would be really 
nice to 
> > have a device which can be instructed by software to:
> > - run with any supported internal clock rate (at least 31.25 
kbaud 
> > which we really need)
> > - run with external clocking
> > - use X databits, Y stopbits and Z parity.
> > - (perhaps) use some timing parameters, like "max time between 
two 
> > bytes" (but I'm not sure we really need this)
> > 
> > That's all I want :-) and it would be the most flexible solution, 
> > capable of communicating with any Emu sampler supporting the 
RS422 
> > interface.
> > 
> > I hope I'm not dreaming ?
> > Crossing my fingers...
> > Good luck !
> > 
> > ///E-Synthesist 
> > 
> > --- In emax@yahoogroups.com, mr julian <jujulilianan@> wrote:
> > >
> > > 
> > > 
> > > tu@ wrote:
> > > 
> > > >Thanks, this protocol makes sense. No doubt Emu did it this 
way so 
> > they could reuse the SDS sample dump code. Can you confirm that 
the 
> > Emax 
> > > >always waits for an Ack/Nak before sending the next packet? 
This 
> > is important to know, as the buffering requirement is much lower 
if 
> > we can be sure a 
> > > >new packet will not arrive until after the last packet has 
been 
> > handled.
> > > >  
> > > >
> > > yeah..... that would make things really simple.
> > > :-)
> > > 
> > > >A side effect of this is that when operating at 31.25k baud 
the 
> > Emax UART is actually working in asynchronous mode. Synchronous 
> > operation 
> > > >only happens when the x1 clock divider is used. Therefore the 
Mac 
> > is presumably doing the same thing at its end when switching 
between 
> > the baud 
> > > >rates.
> > > >  
> > > >
> > > I'm pretty sure the mac would have to have it's own clock for 
> > > asynchronous communication.
> > > 
> > > in asynchronous mode, the UART runs at much faster than 
baudrate 
> > speeds 
> > > (say 500k for 31.25k data ??which is why the emax works fine at 
> > asynch 
> > > 31.25k with this as it's clock, still... ;-) and continually 
> > samples the 
> > > serial data for the start bit. then when it's got a valid start 
> > bit, 
> > > having detected the falling edge at the beginning,  it samples 
the 
> > rest 
> > > of the bits in the middle, and confirms the final edge of the 
stop 
> > bit. 
> > > all being good, the received byte is latched to the output.
> > > 
> > > 
> > > >The easiest solution from your software perspective would be 
if 
> > you could have a USB serial port that supports synchronous RS422 
> > connection to the 
> > > >Emax (or other Emu sampler). Then you handle the protocol, 
baud 
> > rate switching etc and you can use standard Windows drivers. This 
is 
> > presumably 
> > > >what the expensive commercial interfaces are offering and I 
> > presume this is what Julian is working on a low cost alternative 
to. 
> > > >
> > > yep!
> > > :-)
> > > 
> > > basic solution if this works will be one $30 dev board, wired 
to a 
> > > separate board with a couple of ICs. I will just veroboard the 
> > custom 
> > > stuff for now, but if it works and a few people want one, can 
> > always get 
> > > a batch of small PCBs made up for a few $.
> > > 
> > > if I can get away with a simple unchanged serial adapter, that 
> > would be 
> > > amazing - otherwise I might have to put some smarts into my 
buffer 
> > that 
> > > will make it only work with the emax (ie look for header info 
and 
> > > deliberately hold off a packet retransmission to the emax until 
it 
> > has a 
> > > whole one, etc etc - basically make it run off the actual data 
that 
> > > comes through it...)
> > > 
> > > >Another option would be 
> > > >to have a microcontroller with a large buffer memory that the 
PC 
> > can read from and write to using whatever protocol and the 
> > microcontroller would 
> > > >handle the Emu sampler synchronous RS422 interface and 
protocols. 
> > Obviously this would be more work to develop the software for the 
> > microcontroller 
> > > >and possibly the drivers. 
> > > >  
> > > >
> > > yeah - would be best not to have to do that if at all possible.
> > > also, half a MB of fast access RAM for buffering would be 
annoying 
> > to 
> > > deal with hooking up on an 8 bit micro.
> > > 
> > > >Another possibility would be to have a micro controller with 
two 
> > serial interfaces, one to the PC (asynchronous RS422 or RS232) 
and 
> > one to the Emu 
> > > >sampler (synchronous RS422). The micro controller would just 
> > buffer and pass data between the two UARTs and switch baud rates 
> > (31.25k/500k) 
> > > >toward the Emu sampler if required. The PC host could connect 
via 
> > any off the shelf USB to RS232/RS422 adapter or use a built in or 
PCI 
> > serial port. 
> > > >Because of the flow control provided by the Ack/Nak messages, 
the 
> > PC serial connection could also use any baud rate the PC port 
> > supports. Although 
> > > >dumps would be slower at PC baud rates lower than 500kHz, this 
> > would make it widely compatible with any old PC you might happen 
to 
> > have lying 
> > > >around. Both the microcontroller software and hardware would 
be 
> > fairly simple for this option and no special drivers would be 
> > required. The Emax serial 
> > > >port even provides +5V that could be used to power the small 
> > interface board.
> > > >  
> > > >
> > > 
> > > A serial rate converter would be even simpler, but it would be 
nice 
> > to 
> > > be able to have PC side running fast enough that there was no 
gaps 
Show quoted textHide quoted text
> > > between bytes in a packet, as seen by the emax.....
> > >
> > 
> > 
> > 
> > ------------------------------------
> > 
> > Emax and Emax II User's Group Website
> > 
> > http://www.silveriafamily.comYahoo! Groups Links
> > 
> > 
> > 
> -- 
> http://bleepin.com
> 
> -- 
> http://www.fastmail.fm - Same, same, but different...
>

Re: [emax] Re: RS422 fun

2008-11-25 by mr julian

first up, I know NOTHING about the windows driver side of this... I just 
installed a driver that was supplied with the firmware, and I can see 
that in windows system, it's come up as a generic serial port, with 
settings for:

Bits per second: (75-128000)
data bits: (4-8)
parity: (odd, even, none, mark, space)
stop bits: (1, 1.5, 2)
flow control: (Xon/Xoff, hardware, none)

Also, I can open and close this port in hyperterminal, and adjust the 
settings in hyperterminal.... 

Now, I imagine that wheen it is connected to my PC, this port gets 
listed somewhere inside windows in an appropriate place, and 
applications looking for serial ports find its information, and can then 
request to connect/disconnect, and and send config information - just 
like any other serial port.... but if I needed to add extra 
functionality, like a synchronous BPS setting, I have no idea where to 
put that... but maybe I could find out?

I'm still waiting for the 422 chips, so will start seeing what I can 
find out about the driver, and the application-driver interface, plus 
the driver-board  interface. and see what would need to be modified to 
make this do exactly what we want.

But yeah. my ideal finished product would be a USB connected board that 
connects to a PC, and windows sees it as a standard serial interface 
with standard interface parameters including synch/asynch control 
(whatever standard for that is!) and your program could therefore 
connect to it just like it would connect to any other serial interface, 
and work with it the same way for any sampler....

Also, I'm not interested in holding any kind of IP here - I'm really 
just mucking about with configuration and possibly making small 
adjustments to existing open-source code...... if I create a solution, 
I'll provide all assembly instructions/code completely open for anyone 
who wants to use it however they wat.

One thing - you already have EII comms working with a standard off the 
shelf USB connector, don't you???



anyway - we should probably take this discussion off-list. it's getting 
a bit OT for the emax community in general I think.
:-)



esynthesist wrote:
Show quoted textHide quoted text
>OK :-)
>What are the parameters that *can* be changed with the standard 
>driver ? Nothing ??? Isn't it possible to define parity, or clocking 
>by software? If this is true, how can you change these parameters 
>then ? I'm not sure I understand.
>
>I mean: as soon as I can write a piece of C-code (based on sample 
>code provided by you of course ;-), which uses the standard USB 
>driver library, but which contains specific Emax code, that's fine 
>for me; then it's just a matter of writing another piece of code for 
>each Emu sampler we want to support. I was not hoping for more.
>But if the *hardware itself* is built in such a way that it only 
>supports the Emax, then we would need another piece of hardware for 
>the Emulator II, and that would be a shame...
>
>But I guess it will all be software-driven, right ?
>
>///E-Synthesist 
>
>  
>
>  
>

Re: RS422 fun

2008-11-26 by edbleepin

> installed a driver that was supplied with the firmware, and I can see 
> that in windows system, it's come up as a generic serial port, with 
> settings for:
> 
> Bits per second: (75-128000)
> data bits: (4-8)
> parity: (odd, even, none, mark, space)
> stop bits: (1, 1.5, 2)
> flow control: (Xon/Xoff, hardware, none)
> 
> Also, I can open and close this port in hyperterminal, and adjust the 
> settings in hyperterminal.... 
> 
> Now, I imagine that wheen it is connected to my PC, this port gets 
> listed somewhere inside windows in an appropriate place, and 
> applications looking for serial ports find its information, and can
then 
> request to connect/disconnect, and and send config information - just 
> like any other serial port.... but if I needed to add extra 
> functionality, like a synchronous BPS setting, I have no idea where to 
> put that... but maybe I could find out?


Are you using USBtoSerial.c from MyUSB library?
This uses the standard windows usbser.sys driver.

The baudrate setting is sent from the host PC to the firmware by
Set_Line_Coding request. The implementation has already
USB_UnhandledControlPacket event handler in USBtoSerial.c. 
In this handler you'll see SET_LINE_CODING case, after 
LineCodingData struct is set using Endpoint_Read_Control_Stream_LE()
Set the baudrate of your USART.

Ideally that Baud rate setting in hyperterminal is your BPS for RS422
interface, not for your USB data rate. Hyperterminal only has a subset
of baud rates that it thinks it's interface can handle without testing.


 
> I'm still waiting for the 422 chips, so will start seeing what I can 
> find out about the driver, and the application-driver interface, plus 
> the driver-board  interface. and see what would need to be modified to 
> make this do exactly what we want.
> 
> But yeah. my ideal finished product would be a USB connected board that 
> connects to a PC, and windows sees it as a standard serial interface 
> with standard interface parameters including synch/asynch control 
> (whatever standard for that is!) and your program could therefore 
> connect to it just like it would connect to any other serial interface, 
> and work with it the same way for any sampler....
> 
> Also, I'm not interested in holding any kind of IP here - I'm really 
> just mucking about with configuration and possibly making small 
> adjustments to existing open-source code...... if I create a solution, 
> I'll provide all assembly instructions/code completely open for anyone 
> who wants to use it however they wat.
> 
> One thing - you already have EII comms working with a standard off the 
> shelf USB connector, don't you???
> 
> 
> 
> anyway - we should probably take this discussion off-list. it's getting 
> a bit OT for the emax community in general I think.
> :-)

Keep it on list. 
I find it interesting and some people might have some knowledge that
they can impart?

Cheers,
Ed.

Re: [emax] Re: RS422 fun

2008-11-26 by Julian

> Ideally that Baud rate setting in hyperterminal is your BPS for RS422
> interface, not for your USB data rate.

yes! that's what I'm planning on!!!!

USB speed should stay whatever it needs to be, and the baud rate changes
set in HT or in any application effect the baudrate setting to the
outside world. ie the serial port configuration on the AVR.

> Keep it on list. 
> I find it interesting and some people might have some knowledge that
> they can impart?
> 
well... as long as people can delete the messages they're not interesd
in, i suppose that is OK.....
:-)

-- 
http://bleepin.com

-- 
http://www.fastmail.fm - I mean, what is it about a decent email service?

Re: [emax] Re: RS422 fun

2008-11-26 by tu@...

Thanks. Soo it seems the dumps can work with or without handshaking. That is good to know. 

I think the Mac is not actually switching between internal and external UART clocks when switching 
between 31.25k and 500k baud rates. I believe in both cases it continues to use the 500kHz 
external clock but internally switches its clock divider between x1 and x16. In the x1 mode the 
UART (or should it be USART) works synchronously while in the x16 mode the UART works 
asynchronously. The fact that is an external clock used in x16 mode of course makes no real 
difference but it does make a neat solution in this case, given that the 500kHz clock is conveniently 
provided by the Emax. I don't know if the Mac is even capable of setting a 31.25k baud rate 
internally as I think it is set up to work with the standard serial comms baud rates. Presumably Mac 
serial port MIDI interfaces generate their own baud rate clocks.

Unfortunately I do not have an Emax I, just three Emax II racks. If its not too much trouble, it 
would nice if you could implement a basic sample dump via RS422 function in EMXP so I could test 
with these. As the SDS is very similar to the Emax I bank dump protocol I presume it would not 
require much extra coding. It could even just dump dummy sample data, like an ascending counter 
sawtooth wave. Being able to read back a sample from the Emax would make a good test too :)

Regards,

Tristan

Tuesday, November 25, 2008, 5:01:20 AM, you wrote:

>
Tristan,

Actually I only tried the Emax-->PC bank transfer, so I can't say 
anything about the other direction yet.
So concerning the Emax->PC transfer: in fact the Emax can live with 
the fact that no ACKs are being sent by the host. If no ACK (or data 
in general) is transmitted for about 55 msec, Emax seems to decide to 
send the next packet. Sounds great, but note that a bank transfer 
takes a lot of time this way (waiting for these ACKs will already 
take more than 4 minutes in total :-). But I was able to download 
banks this way, yes...
So why doesn't the Emax re-send the packet for max. 5 times ?
Because after initially sending the packet, the PC sends an ACK to 
the Emax which fails to arrive correctly on the Emax. The Emax 
replies immediately with a "Cancel Dump" message and on the Emax 
display the error "Aborted - Bad ACK received for packet XXXX".

You're right about the 31.25kbaud communication: this is indeed 
asynchronous, so it's relying on the internal clock. That means 
switching from internal to external clock for unloading/loading banks.

About your request to send/receive wavs between EMXP and the Emax: no 
problem, that can be done once we succeed in getting the hardware 
comms up and running ! 

///E-Synthesist

--- In emax@yahoogroups.com, tu@... wrote:
>
> Thanks, this protocol makes sense. No doubt Emu did it this way so 
they could reuse the SDS sample dump code. Can you confirm that the 
Emax 
> always waits for an Ack/Nak before sending the next packet? This is 
important to know, as the buffering requirement is much lower if we 
can be sure a 
> new packet will not arrive until after the last packet has been 
handled.
> 
> Its interesting you should mention the 31.25k/500k baud rate 
switching. The Emax UART must do this by selecting x1 or x16 clock 
divider mode in the 
> UART. According to the schemtics, the 500kHz clock being sent out 
of the RS422 port and driving the Emax UART TX & RX does not change 
in 
> frequency. A side effect of this is that when operating at 31.25k 
baud the Emax UART is actually working in asynchronous mode. 
Synchronous operation 
> only happens when the x1 clock divider is used. Therefore the Mac 
is presumably doing the same thing at its end when switching between 
the baud 
> rates.
> 
> You earlier reported that the Emax bank dump must be continuous 
with no resent packets. But I notice the MIDI SDS implementation in 
the Emax allows 
> for up to 5 resends if a Nak is received for a particular packet. 
When your bank dump failed was this because of the RS422 clock 
synchronization 
> problem? If so, it is likely any subsequent resends of the packet 
would also have failed and received a Nak. This leads me to suspect 
that with a working 
> synchronous RS422 connection you probably could continue the dump 
by resending packets that returned a Nak from the Emax.
> 
> The easiest solution from your software perspective would be if you 
could have a USB serial port that supports synchronous RS422 
connection to the 
> Emax (or other Emu sampler). Then you handle the protocol, baud 
rate switching etc and you can use standard Windows drivers. This is 
presumably 
> what the expensive commercial interfaces are offering and I presume 
this is what Julian is working on a low cost alternative to. Another 
option would be 
> to have a microcontroller with a large buffer memory that the PC 
can read from and write to using whatever protocol and the 
microcontroller would 
> handle the Emu sampler synchronous RS422 interface and protocols. 
Obviously this would be more work to develop the software for the 
microcontroller 
> and possibly the drivers. 
> 
> Another possibility would be to have a micro controller with two 
serial interfaces, one to the PC (asynchronous RS422 or RS232) and 
one to the Emu 
> sampler (synchronous RS422). The micro controller would just buffer 
and pass data between the two UARTs and switch baud rates 
(31.25k/500k) 
> toward the Emu sampler if required. The PC host could connect via 
any off the shelf USB to RS232/RS422 adapter or use a built in or PCI 
serial port. 
> Because of the flow control provided by the Ack/Nak messages, the 
PC serial connection could also use any baud rate the PC port 
supports. Although 
> dumps would be slower at PC baud rates lower than 500kHz, this 
would make it widely compatible with any old PC you might happen to 
have lying 
> around. Both the microcontroller software and hardware would be 
fairly simple for this option and no special drivers would be 
required. The Emax serial 
> port even provides +5V that could be used to power the small 
interface board.
> 
> I would be very interested to have the option in EMXP to dump 
samples to and from the Emax (or other Emu RS422 equiped sampler) 
directly from wav 
> files. Then it would be easy to take a sample, transfer it to the 
PC, edit on any PC editor that supports wav and then dump back to the 
sampler again. 
> Do you have any plan to implement something like this in addition 
to bank transfers?
> 
> /Tristan
> 
> Monday, November 24, 2008, 2:30:34 AM, you wrote:
> 
> >
> O yes, the protocol.
> It's really simple in fact. It's based on MMA as it has been 
> described in the MIDI SYSEX v3.0 docs of Emu.
> It's just that the "Get Bank" and "Send Bank" SYSEX commands were 
> missing in that document. Here they are:
> 
> 1/ To send a bank from Emax to Host Computer:
> - the host should send F0 18 02 09 F7 at 31.25kbaud to the Emax 
> (Request to Send Bank Fast)
> - the Emax will respond with F0 18 02 0F F7 at 31.25kbaud (Accept 
> Bank Fast)
> - then Emax switches to 500kbaud, and the host computer should do 
> so too.
> - from that point on the communication is exactly the same as the 
> one described for Send Sample Fast: the host should send an initial 
> ACK (F0 7E 0C 7F 00 F7) and then the data dump starts. The Emax 
sends 
> MMA data packets (127 bytes containing 120 data bytes), and each 
> packet should be ACKed by the host (F0 7E 0C 7F pp F7 with pp = 
> packet number looping from 0x00 to 0xFF, then back to 0x00 again 
and 
> so on).
> - in total 4609 of these packet transmissions + ACKs should be done.
> 
> 2/ To send a bank from Host Computer to Emax:
> - the host should send F0 18 02 0F F7 at 31.25kbaud to the Emax 
> (Accept Bank Fast)
> - the Emax will immediately switch to 500kbaud and the host 
> computer should do so too
> - the Emax will send an ACK (if everything goes well) i.e. F0 7E 0C 
> 7F 00 F7
> - then the host should start sending MMA packets, which will be 
> ACKed by the Emax one after another (packets 00=0x00 to 127=0xFF 
and 
> then again from 0x00)
> 
> That's about it.
> To find this out, I simply tried the first undocumented SYSEX code 
> (09) and I immediately had luck ! It seemed to be the command I was 
> looking for.
> Sniffing the communication between my Mac (Sound Designer for Emax) 
> and the Emax confirms that this is the protocol that should be used.
> 
> Of course I want to add the RS422 load/unload features to EMXP, and 
> was hoping to be able to use the standard Windows C serial 
> communication library of Microsoft.
> If some of you succeed in creating hardware for the RS422 it would 
be 
> great that this library can be used. If some special hardware 
> specific library must be used I can get in trouble with freeware 
> licensing for EMXP... unless that library would be completely free 
> also.
> 
> PS: the fact that the host must initiate the communication at 31.25 
> kbaud and then has to switch to 500kbaud is something to think 
about 
> when using external clocking. I suppose and hope that even this 
31.25 
> kbaud is clocked by the Emax to the Mac, so that the host doesn't 
> have to change from internal clocking to external clocking all the 
> time.
> 
> ///E-Synthesist
> --- In emax@yahoogroups.com, tu@ wrote:
> >
> > If the Emax bank dump protocol uses the same format as the MMA 
SDS 
> data packet then each 
> > packet only requires 127 bytes. That should not be too difficult 
to 
> buffer.
> > 
> > If each packet requires a Ack/Nak reply then there is a built in 
> flow control mechanism and no 
> > RTS/CTS hardware flow control is required. 
> > 
> > Esynthesist, would it be possible for you to reveal a bit more 
> detail about the bank dump protocol? 
> > What goes in the headers etc?
> > 
> > /Tristan
> > 
> > Sunday, November 23, 2008, 9:01:15 PM, you wrote:
> > 
> > >
> > 
> > esynthesist wrote:
> > 
> > > Oops. I'm getting depressed finding out that my s/h USD50 old 
Mac 
> is
> > >
> > >equipped with two (!) serial ports capable of what one (!) new 
> USD399 
> > >one can do. And for that 50 dollars the Mac package also 
includes 
> a 
> > >computer with screen, keyboard, harddisk and floppy drive :-)
> > >(ok, the Quatech will have more *serial* features, but still...)
> > > 
> > >
> > yeah.... modern computers move on from old tech, but then when 
you 
> need 
> > the simple old features of the old tech, they're no longer a 
> standard 
> > item, and you pay $$
> > 
> > >So I guess the next step is custom building one, e.g. with 
> > >experimental/evaluation boards or from scratch. 
> > >Not my piece of cake...
> > > 
> > >
> > Well, I did some investigating, and got the basic RS232 adapter 
> test 
> > code up and working with serial loopback on my dev board, and 
read 
> > through the manual about setting up the avr USART for synchronous 
> > communication, which looks really simple... (though will have to 
> build 
> > some buffer circuits, and then do more testing running it in 
> loopback, 
> > while being externally clocked form the emax, before I can say 
> it'll 
> > even be approaching being a possibly being useful solution)
> > 
> > note: this will never work as well as a proper US$399 synchronous 
> > interface, because it will be limited by whatever buffer size 
that 
> can 
> > be made in the AVR(which has only 8k of ram), after the USB stack 
> and 
> > the basic code takes everything it needs, but it's possible that 
> maybe 
> > with a bit of tweaking, it can be made to work well enough to 
send 
> and 
> > receive packets for the emax... as long as it's allowed to spend 
a 
> bit 
> > of time shuffling data to/from the PC between packets....
> > 
> > so - how big are the packets that the emax sends and receives, 
> anyway??
> > 
> > >I guess experimenting with the CTS/RTS signals also does not 
make 
> > >sense anymore, right ? I thought it could be a way to keep the 
> > >drifting under control... I guess not... 
> > > 
> > >
> > nope... sorry... it's the mechanism for either side of the comms 
> pair to 
> > say "hold up! I've had enough!!" to the other side, instead of 
just 
> > overflowing and crapping out...
> > 
> > looking at my service manual again, I don't see CTS or RTS here 
> > either.... just tx, rx, and clock. so I guess that's all we need, 
> to 
> > talk to the emax from a PC?
> > 
> > >And I'm still a bit afraid that it could damage my PC RS422 port 
> > >since the RTS/CTS pins are expecting either positive or negative 
> > >voltages but not a mixture of them. Or are those ports typically 
> > >protected against this "abuse" ?
> > > 
> > >
> > They are protected, to some degree.
> > 
> > btw, "+" and "-" do not refer to the voltage polarity of a 
balanced 
> > signal, they refer to the logical polarity. in this case, I think 
> you'll 
> > find RS422 + and - parts of a signal are both always in the range 
> of 0V 
> > to 5V, but the "+" is 5V when the "-" is 0v, and the "-" is 5V 
when 
Show quoted textHide quoted text
> the 
> > "+ is 0v....
> >
>

Re: [emax] Re: RS422 fun

2008-11-26 by tu@...

It seems there are only five different Emu RS422 equipped samplers to be supported: Emax I, Emax II, EII, EIII and EIIIx. So it should be quite simple 
to have some DIP switches on the interface that could be used to select the type of device in use. I am of course assuming the interface would only be 
connected to one sampler at a time... 

/Tristan

Tuesday, November 25, 2008, 6:12:14 AM, you wrote:

>
I hope you can create a device which is not restricted to the Emax ! 
If we could use the same device with the EII that would be awesome.

From a software developer's point of view, it would be really nice to 
have a device which can be instructed by software to:
- run with any supported internal clock rate (at least 31.25 kbaud 
which we really need)
- run with external clocking
- use X databits, Y stopbits and Z parity.
- (perhaps) use some timing parameters, like "max time between two 
bytes" (but I'm not sure we really need this)

That's all I want :-) and it would be the most flexible solution, 
capable of communicating with any Emu sampler supporting the RS422 
interface.

I hope I'm not dreaming ?
Crossing my fingers...
Good luck !

///E-Synthesist 

--- In emax@yahoogroups.com, mr julian <jujulilianan@...> wrote:
>
> 
> 
> tu@... wrote:
> 
> >Thanks, this protocol makes sense. No doubt Emu did it this way so 
they could reuse the SDS sample dump code. Can you confirm that the 
Emax 
> >always waits for an Ack/Nak before sending the next packet? This 
is important to know, as the buffering requirement is much lower if 
we can be sure a 
> >new packet will not arrive until after the last packet has been 
handled.
> > 
> >
> yeah..... that would make things really simple.
> :-)
> 
> >A side effect of this is that when operating at 31.25k baud the 
Emax UART is actually working in asynchronous mode. Synchronous 
operation 
> >only happens when the x1 clock divider is used. Therefore the Mac 
is presumably doing the same thing at its end when switching between 
the baud 
> >rates.
> > 
> >
> I'm pretty sure the mac would have to have it's own clock for 
> asynchronous communication.
> 
> in asynchronous mode, the UART runs at much faster than baudrate 
speeds 
> (say 500k for 31.25k data ??which is why the emax works fine at 
asynch 
> 31.25k with this as it's clock, still... ;-) and continually 
samples the 
> serial data for the start bit. then when it's got a valid start 
bit, 
> having detected the falling edge at the beginning, it samples the 
rest 
> of the bits in the middle, and confirms the final edge of the stop 
bit. 
> all being good, the received byte is latched to the output.
> 
> 
> >The easiest solution from your software perspective would be if 
you could have a USB serial port that supports synchronous RS422 
connection to the 
> >Emax (or other Emu sampler). Then you handle the protocol, baud 
rate switching etc and you can use standard Windows drivers. This is 
presumably 
> >what the expensive commercial interfaces are offering and I 
presume this is what Julian is working on a low cost alternative to. 
> >
> yep!
> :-)
> 
> basic solution if this works will be one $30 dev board, wired to a 
> separate board with a couple of ICs. I will just veroboard the 
custom 
> stuff for now, but if it works and a few people want one, can 
always get 
> a batch of small PCBs made up for a few $.
> 
> if I can get away with a simple unchanged serial adapter, that 
would be 
> amazing - otherwise I might have to put some smarts into my buffer 
that 
> will make it only work with the emax (ie look for header info and 
> deliberately hold off a packet retransmission to the emax until it 
has a 
> whole one, etc etc - basically make it run off the actual data that 
> comes through it...)
> 
> >Another option would be 
> >to have a microcontroller with a large buffer memory that the PC 
can read from and write to using whatever protocol and the 
microcontroller would 
> >handle the Emu sampler synchronous RS422 interface and protocols. 
Obviously this would be more work to develop the software for the 
microcontroller 
> >and possibly the drivers. 
> > 
> >
> yeah - would be best not to have to do that if at all possible.
> also, half a MB of fast access RAM for buffering would be annoying 
to 
> deal with hooking up on an 8 bit micro.
> 
> >Another possibility would be to have a micro controller with two 
serial interfaces, one to the PC (asynchronous RS422 or RS232) and 
one to the Emu 
> >sampler (synchronous RS422). The micro controller would just 
buffer and pass data between the two UARTs and switch baud rates 
(31.25k/500k) 
> >toward the Emu sampler if required. The PC host could connect via 
any off the shelf USB to RS232/RS422 adapter or use a built in or PCI 
serial port. 
> >Because of the flow control provided by the Ack/Nak messages, the 
PC serial connection could also use any baud rate the PC port 
supports. Although 
> >dumps would be slower at PC baud rates lower than 500kHz, this 
would make it widely compatible with any old PC you might happen to 
have lying 
> >around. Both the microcontroller software and hardware would be 
fairly simple for this option and no special drivers would be 
required. The Emax serial 
> >port even provides +5V that could be used to power the small 
interface board.
> > 
> >
> 
> A serial rate converter would be even simpler, but it would be nice 
to 
Show quoted textHide quoted text
> be able to have PC side running fast enough that there was no gaps 
> between bytes in a packet, as seen by the emax.....
>

OT: Re: RS422 fun

2008-11-26 by esynthesist

>>>>One thing - you already have EII comms working with a standard 
off the shelf USB connector, don't you???
<<<<
Yes I have, but it works only for sending banks from the EII to the 
PC, not the other way around, due to the synchronization loss... 
which was the reason why I posted this RS422 questions to Emu 
groups :-)

I you'd like to have the example C code I used for this and/or for 
the Emax bank unload, I can send them to you.
The Emax code "works" but as I mentoned before the communication gets 
out of sync after receiving about 40 datapackets, due to the lack of 
sync comm.
The code contains basically the port configurations (baudrate, 
parity, ...) and the open/read/write/close instructions to perform 
the actual communication. It uses the standard serial communication 
library of Microsoft (Visual C), based on things like DCB 
configuration. In these communication libraries I haven't found any 
structure/function yet which allows to set the baudrate to "external 
clocking" instead of a "number" (internal clocking).
But perhaps the provided software with your device can be driven in 
another way, allowing for other parameters sent accross the USB 
serial class.

...So we stay "on" topic in this board with the Q&A about RS422 and 
the experiments to get the thing working for Emax ?

///E-Synthesist

--- In emax@yahoogroups.com, mr julian <jujulilianan@...> wrote:
>
> first up, I know NOTHING about the windows driver side of this... I 
just 
> installed a driver that was supplied with the firmware, and I can 
see 
> that in windows system, it's come up as a generic serial port, with 
> settings for:
> 
> Bits per second: (75-128000)
> data bits: (4-8)
> parity: (odd, even, none, mark, space)
> stop bits: (1, 1.5, 2)
> flow control: (Xon/Xoff, hardware, none)
> 
> Also, I can open and close this port in hyperterminal, and adjust 
the 
> settings in hyperterminal.... 
> 
> Now, I imagine that wheen it is connected to my PC, this port gets 
> listed somewhere inside windows in an appropriate place, and 
> applications looking for serial ports find its information, and can 
then 
> request to connect/disconnect, and and send config information - 
just 
> like any other serial port.... but if I needed to add extra 
> functionality, like a synchronous BPS setting, I have no idea where 
to 
> put that... but maybe I could find out?
> 
> I'm still waiting for the 422 chips, so will start seeing what I 
can 
> find out about the driver, and the application-driver interface, 
plus 
> the driver-board  interface. and see what would need to be modified 
to 
> make this do exactly what we want.
> 
> But yeah. my ideal finished product would be a USB connected board 
that 
> connects to a PC, and windows sees it as a standard serial 
interface 
> with standard interface parameters including synch/asynch control 
> (whatever standard for that is!) and your program could therefore 
> connect to it just like it would connect to any other serial 
interface, 
> and work with it the same way for any sampler....
> 
> Also, I'm not interested in holding any kind of IP here - I'm 
really 
> just mucking about with configuration and possibly making small 
> adjustments to existing open-source code...... if I create a 
solution, 
> I'll provide all assembly instructions/code completely open for 
anyone 
> who wants to use it however they wat.
> 
> One thing - you already have EII comms working with a standard off 
the 
> shelf USB connector, don't you???
> 
> 
> 
> anyway - we should probably take this discussion off-list. it's 
getting 
> a bit OT for the emax community in general I think.
> :-)
> 
> 
> 
> esynthesist wrote:
> 
> >OK :-)
> >What are the parameters that *can* be changed with the standard 
> >driver ? Nothing ??? Isn't it possible to define parity, or 
clocking 
> >by software? If this is true, how can you change these parameters 
> >then ? I'm not sure I understand.
> >
> >I mean: as soon as I can write a piece of C-code (based on sample 
> >code provided by you of course ;-), which uses the standard USB 
> >driver library, but which contains specific Emax code, that's fine 
> >for me; then it's just a matter of writing another piece of code 
for 
> >each Emu sampler we want to support. I was not hoping for more.
> >But if the *hardware itself* is built in such a way that it only 
> >supports the Emax, then we would need another piece of hardware 
for 
Show quoted textHide quoted text
> >the Emulator II, and that would be a shame...
> >
> >But I guess it will all be software-driven, right ?
> >
> >///E-Synthesist 
> >
> >  
> >
> >  
> >
>

Re: [emax] OT: Re: RS422 fun

2008-11-26 by Ted Summers

Well, for the person who is going to build the interface board- what  
about using the clock out from the emax as input into the clock  
circuit of the UART on the interface board to be built?

Would that make it synchronized?

Regards,
Ted


On Nov 26, 2008, at 1:41 PM, esynthesist wrote:

 >>>>One thing - you already have EII comms working with a standard
off the shelf USB connector, don't you???
<<<<
Yes I have, but it works only for sending banks from the EII to the
PC, not the other way around, due to the synchronization loss...
which was the reason why I posted this RS422 questions to Emu
groups :-)

I you'd like to have the example C code I used for this and/or for
the Emax bank unload, I can send them to you.
The Emax code "works" but as I mentoned before the communication gets
out of sync after receiving about 40 datapackets, due to the lack of
sync comm.
The code contains basically the port configurations (baudrate,
parity, ...) and the open/read/write/close instructions to perform
the actual communication. It uses the standard serial communication
library of Microsoft (Visual C), based on things like DCB
configuration. In these communication libraries I haven't found any
structure/function yet which allows to set the baudrate to "external
clocking" instead of a "number" (internal clocking).
But perhaps the provided software with your device can be driven in
another way, allowing for other parameters sent accross the USB
serial class.

...So we stay "on" topic in this board with the Q&A about RS422 and
the experiments to get the thing working for Emax ?

///E-Synthesist

--- In emax@yahoogroups.com, mr julian <jujulilianan@...> wrote:
 >
 > first up, I know NOTHING about the windows driver side of this... I
just
 > installed a driver that was supplied with the firmware, and I can
see
 > that in windows system, it's come up as a generic serial port, with
 > settings for:
 >
 > Bits per second: (75-128000)
 > data bits: (4-8)
 > parity: (odd, even, none, mark, space)
 > stop bits: (1, 1.5, 2)
 > flow control: (Xon/Xoff, hardware, none)
 >
 > Also, I can open and close this port in hyperterminal, and adjust
the
 > settings in hyperterminal....
 >
 > Now, I imagine that wheen it is connected to my PC, this port gets
 > listed somewhere inside windows in an appropriate place, and
 > applications looking for serial ports find its information, and can
then
 > request to connect/disconnect, and and send config information -
just
 > like any other serial port.... but if I needed to add extra
 > functionality, like a synchronous BPS setting, I have no idea where
to
 > put that... but maybe I could find out?
 >
 > I'm still waiting for the 422 chips, so will start seeing what I
can
 > find out about the driver, and the application-driver interface,
plus
 > the driver-board interface. and see what would need to be modified
to
 > make this do exactly what we want.
 >
 > But yeah. my ideal finished product would be a USB connected board
that
 > connects to a PC, and windows sees it as a standard serial
interface
 > with standard interface parameters including synch/asynch control
 > (whatever standard for that is!) and your program could therefore
 > connect to it just like it would connect to any other serial
interface,
 > and work with it the same way for any sampler....
 >
 > Also, I'm not interested in holding any kind of IP here - I'm
really
 > just mucking about with configuration and possibly making small
 > adjustments to existing open-source code...... if I create a
solution,
 > I'll provide all assembly instructions/code completely open for
anyone
 > who wants to use it however they wat.
 >
 > One thing - you already have EII comms working with a standard off
the
 > shelf USB connector, don't you???
 >
 >
 >
 > anyway - we should probably take this discussion off-list. it's
getting
 > a bit OT for the emax community in general I think.
 > :-)
 >
 >
 >
 > esynthesist wrote:
 >
 > >OK :-)
 > >What are the parameters that *can* be changed with the standard
 > >driver ? Nothing ??? Isn't it possible to define parity, or
clocking
 > >by software? If this is true, how can you change these parameters
 > >then ? I'm not sure I understand.
 > >
 > >I mean: as soon as I can write a piece of C-code (based on sample
 > >code provided by you of course ;-), which uses the standard USB
 > >driver library, but which contains specific Emax code, that's fine
 > >for me; then it's just a matter of writing another piece of code
for
 > >each Emu sampler we want to support. I was not hoping for more.
 > >But if the *hardware itself* is built in such a way that it only
 > >supports the Emax, then we would need another piece of hardware
for
 > >the Emulator II, and that would be a shame...
 > >
 > >But I guess it will all be software-driven, right ?
 > >
 > >///E-Synthesist
 > >
 > >
 > >
 > >
 > >
 >





[Non-text portions of this message have been removed]

OT: Re: RS422 fun

2008-11-27 by edbleepin

--- In emax@yahoogroups.com, Ted Summers <djtbs1@...> wrote:
>
> Well, for the person who is going to build the interface board- what  
> about using the clock out from the emax as input into the clock  
> circuit of the UART on the interface board to be built?
> 
> Would that make it synchronized?

Yep. But does the X1 and X16 modes need to be both clocked?
If not there needs to be some software (PC side) to tell the board to
change to and from synchronous/asynchronous.

I have very little Mac knowledge...
Some brief research from interweb has revealed that the 8-pin port is
not really RS-422 on the Mac but Appletalk/localtalk?
So I see for USB MAC owners solutions are 
http://www.geethree.com/stealth/index.html
- card that replaces the modem card.
and
http://www.keyspan.com/products/usa28xg/homepage.spml
- But apparently not on OSX.

Cheers,
Ed.
Show quoted textHide quoted text
> Regards,
> Ted
> 
> 
> On Nov 26, 2008, at 1:41 PM, esynthesist wrote:
> 
>  >>>>One thing - you already have EII comms working with a standard
> off the shelf USB connector, don't you???
> <<<<
> Yes I have, but it works only for sending banks from the EII to the
> PC, not the other way around, due to the synchronization loss...
> which was the reason why I posted this RS422 questions to Emu
> groups :-)
> 
> I you'd like to have the example C code I used for this and/or for
> the Emax bank unload, I can send them to you.
> The Emax code "works" but as I mentoned before the communication gets
> out of sync after receiving about 40 datapackets, due to the lack of
> sync comm.
> The code contains basically the port configurations (baudrate,
> parity, ...) and the open/read/write/close instructions to perform
> the actual communication. It uses the standard serial communication
> library of Microsoft (Visual C), based on things like DCB
> configuration. In these communication libraries I haven't found any
> structure/function yet which allows to set the baudrate to "external
> clocking" instead of a "number" (internal clocking).
> But perhaps the provided software with your device can be driven in
> another way, allowing for other parameters sent accross the USB
> serial class.
> 
> ...So we stay "on" topic in this board with the Q&A about RS422 and
> the experiments to get the thing working for Emax ?
> 
> ///E-Synthesist
> 
> --- In emax@yahoogroups.com, mr julian <jujulilianan@> wrote:
>  >
>  > first up, I know NOTHING about the windows driver side of this... I
> just
>  > installed a driver that was supplied with the firmware, and I can
> see
>  > that in windows system, it's come up as a generic serial port, with
>  > settings for:
>  >
>  > Bits per second: (75-128000)
>  > data bits: (4-8)
>  > parity: (odd, even, none, mark, space)
>  > stop bits: (1, 1.5, 2)
>  > flow control: (Xon/Xoff, hardware, none)
>  >
>  > Also, I can open and close this port in hyperterminal, and adjust
> the
>  > settings in hyperterminal....
>  >
>  > Now, I imagine that wheen it is connected to my PC, this port gets
>  > listed somewhere inside windows in an appropriate place, and
>  > applications looking for serial ports find its information, and can
> then
>  > request to connect/disconnect, and and send config information -
> just
>  > like any other serial port.... but if I needed to add extra
>  > functionality, like a synchronous BPS setting, I have no idea where
> to
>  > put that... but maybe I could find out?
>  >
>  > I'm still waiting for the 422 chips, so will start seeing what I
> can
>  > find out about the driver, and the application-driver interface,
> plus
>  > the driver-board interface. and see what would need to be modified
> to
>  > make this do exactly what we want.
>  >
>  > But yeah. my ideal finished product would be a USB connected board
> that
>  > connects to a PC, and windows sees it as a standard serial
> interface
>  > with standard interface parameters including synch/asynch control
>  > (whatever standard for that is!) and your program could therefore
>  > connect to it just like it would connect to any other serial
> interface,
>  > and work with it the same way for any sampler....
>  >
>  > Also, I'm not interested in holding any kind of IP here - I'm
> really
>  > just mucking about with configuration and possibly making small
>  > adjustments to existing open-source code...... if I create a
> solution,
>  > I'll provide all assembly instructions/code completely open for
> anyone
>  > who wants to use it however they wat.
>  >
>  > One thing - you already have EII comms working with a standard off
> the
>  > shelf USB connector, don't you???
>  >
>  >
>  >
>  > anyway - we should probably take this discussion off-list. it's
> getting
>  > a bit OT for the emax community in general I think.
>  > :-)
>  >
>  >
>  >
>  > esynthesist wrote:
>  >
>  > >OK :-)
>  > >What are the parameters that *can* be changed with the standard
>  > >driver ? Nothing ??? Isn't it possible to define parity, or
> clocking
>  > >by software? If this is true, how can you change these parameters
>  > >then ? I'm not sure I understand.
>  > >
>  > >I mean: as soon as I can write a piece of C-code (based on sample
>  > >code provided by you of course ;-), which uses the standard USB
>  > >driver library, but which contains specific Emax code, that's fine
>  > >for me; then it's just a matter of writing another piece of code
> for
>  > >each Emu sampler we want to support. I was not hoping for more.
>  > >But if the *hardware itself* is built in such a way that it only
>  > >supports the Emax, then we would need another piece of hardware
> for
>  > >the Emulator II, and that would be a shame...
>  > >
>  > >But I guess it will all be software-driven, right ?
>  > >
>  > >///E-Synthesist
>  > >
>  > >
>  > >
>  > >
>  > >
>  >
> 
> 
> 
> 
> 
> [Non-text portions of this message have been removed]
>

OT: Re: RS422 fun

2009-11-05 by gadgetfiddler

have you considered utulizing the printer port on a pc to make the data transfer into the rs-422 port on the emaxII?
I've got a cord with a male printer port plug on one side and a female serial port plug on the other.

--- In emax@yahoogroups.com, Ted Summers <djtbs1@...> wrote:
Show quoted textHide quoted text
>
> Well, for the person who is going to build the interface board- what  
> about using the clock out from the emax as input into the clock  
> circuit of the UART on the interface board to be built?
> 
> Would that make it synchronized?
> 
> Regards,
> Ted
> 
> 
> On Nov 26, 2008, at 1:41 PM, esynthesist wrote:
> 
>  >>>>One thing - you already have EII comms working with a standard
> off the shelf USB connector, don't you???
> <<<<
> Yes I have, but it works only for sending banks from the EII to the
> PC, not the other way around, due to the synchronization loss...
> which was the reason why I posted this RS422 questions to Emu
> groups :-)
> 
> I you'd like to have the example C code I used for this and/or for
> the Emax bank unload, I can send them to you.
> The Emax code "works" but as I mentoned before the communication gets
> out of sync after receiving about 40 datapackets, due to the lack of
> sync comm.
> The code contains basically the port configurations (baudrate,
> parity, ...) and the open/read/write/close instructions to perform
> the actual communication. It uses the standard serial communication
> library of Microsoft (Visual C), based on things like DCB
> configuration. In these communication libraries I haven't found any
> structure/function yet which allows to set the baudrate to "external
> clocking" instead of a "number" (internal clocking).
> But perhaps the provided software with your device can be driven in
> another way, allowing for other parameters sent accross the USB
> serial class.
> 
> ...So we stay "on" topic in this board with the Q&A about RS422 and
> the experiments to get the thing working for Emax ?
> 
> ///E-Synthesist
> 
> --- In emax@yahoogroups.com, mr julian <jujulilianan@> wrote:
>  >
>  > first up, I know NOTHING about the windows driver side of this... I
> just
>  > installed a driver that was supplied with the firmware, and I can
> see
>  > that in windows system, it's come up as a generic serial port, with
>  > settings for:
>  >
>  > Bits per second: (75-128000)
>  > data bits: (4-8)
>  > parity: (odd, even, none, mark, space)
>  > stop bits: (1, 1.5, 2)
>  > flow control: (Xon/Xoff, hardware, none)
>  >
>  > Also, I can open and close this port in hyperterminal, and adjust
> the
>  > settings in hyperterminal....
>  >
>  > Now, I imagine that wheen it is connected to my PC, this port gets
>  > listed somewhere inside windows in an appropriate place, and
>  > applications looking for serial ports find its information, and can
> then
>  > request to connect/disconnect, and and send config information -
> just
>  > like any other serial port.... but if I needed to add extra
>  > functionality, like a synchronous BPS setting, I have no idea where
> to
>  > put that... but maybe I could find out?
>  >
>  > I'm still waiting for the 422 chips, so will start seeing what I
> can
>  > find out about the driver, and the application-driver interface,
> plus
>  > the driver-board interface. and see what would need to be modified
> to
>  > make this do exactly what we want.
>  >
>  > But yeah. my ideal finished product would be a USB connected board
> that
>  > connects to a PC, and windows sees it as a standard serial
> interface
>  > with standard interface parameters including synch/asynch control
>  > (whatever standard for that is!) and your program could therefore
>  > connect to it just like it would connect to any other serial
> interface,
>  > and work with it the same way for any sampler....
>  >
>  > Also, I'm not interested in holding any kind of IP here - I'm
> really
>  > just mucking about with configuration and possibly making small
>  > adjustments to existing open-source code...... if I create a
> solution,
>  > I'll provide all assembly instructions/code completely open for
> anyone
>  > who wants to use it however they wat.
>  >
>  > One thing - you already have EII comms working with a standard off
> the
>  > shelf USB connector, don't you???
>  >
>  >
>  >
>  > anyway - we should probably take this discussion off-list. it's
> getting
>  > a bit OT for the emax community in general I think.
>  > :-)
>  >
>  >
>  >
>  > esynthesist wrote:
>  >
>  > >OK :-)
>  > >What are the parameters that *can* be changed with the standard
>  > >driver ? Nothing ??? Isn't it possible to define parity, or
> clocking
>  > >by software? If this is true, how can you change these parameters
>  > >then ? I'm not sure I understand.
>  > >
>  > >I mean: as soon as I can write a piece of C-code (based on sample
>  > >code provided by you of course ;-), which uses the standard USB
>  > >driver library, but which contains specific Emax code, that's fine
>  > >for me; then it's just a matter of writing another piece of code
> for
>  > >each Emu sampler we want to support. I was not hoping for more.
>  > >But if the *hardware itself* is built in such a way that it only
>  > >supports the Emax, then we would need another piece of hardware
> for
>  > >the Emulator II, and that would be a shame...
>  > >
>  > >But I guess it will all be software-driven, right ?
>  > >
>  > >///E-Synthesist
>  > >
>  > >
>  > >
>  > >
>  > >
>  >
> 
> 
> 
> 
> 
> [Non-text portions of this message have been removed]
>

Re: [emax] OT: Re: RS422 fun

2009-11-05 by Ted Summers

That cable would actually be a serial cable. I have a couple of these
myself.
Parallel ports by definition are not serial.

Parallel has a datawire for each of the 8 bits, serial has one datawire that
tranfers all the bits for a single byte.
Just because the plug fits, doesn't mean that the two devices talk, the
protocol is right or even that the pinout is compatible.

Many a person has plugged a cable into a port on a PC and blown up one or
the other or both due to signal pinout differences.

Since everything is builtin on modern PC motherboards, it is no longer as
simple as swapping an interface board. You can blow up the IC that controls
all I/O that interface to the PCI bus. That can become the time to buy a new
motherboard.

YMMV



On Thu, Nov 5, 2009 at 1:04 PM, gadgetfiddler <gadgetfiddler@...>wrote:

>
>
> have you considered utulizing the printer port on a pc to make the data
> transfer into the rs-422 port on the emaxII?
> I've got a cord with a male printer port plug on one side and a female
> serial port plug on the other.
>
> --- In emax@yahoogroups.com <emax%40yahoogroups.com>, Ted Summers <djtbs1@...>
> wrote:
> >
> > Well, for the person who is going to build the interface board- what
> > about using the clock out from the emax as input into the clock
> > circuit of the UART on the interface board to be built?
> >
> > Would that make it synchronized?
> >
> > Regards,
> > Ted
> >
> >
> > On Nov 26, 2008, at 1:41 PM, esynthesist wrote:
> >
> > >>>>One thing - you already have EII comms working with a standard
> > off the shelf USB connector, don't you???
> > <<<<
> > Yes I have, but it works only for sending banks from the EII to the
> > PC, not the other way around, due to the synchronization loss...
> > which was the reason why I posted this RS422 questions to Emu
> > groups :-)
> >
> > I you'd like to have the example C code I used for this and/or for
> > the Emax bank unload, I can send them to you.
> > The Emax code "works" but as I mentoned before the communication gets
> > out of sync after receiving about 40 datapackets, due to the lack of
> > sync comm.
> > The code contains basically the port configurations (baudrate,
> > parity, ...) and the open/read/write/close instructions to perform
> > the actual communication. It uses the standard serial communication
> > library of Microsoft (Visual C), based on things like DCB
> > configuration. In these communication libraries I haven't found any
> > structure/function yet which allows to set the baudrate to "external
> > clocking" instead of a "number" (internal clocking).
> > But perhaps the provided software with your device can be driven in
> > another way, allowing for other parameters sent accross the USB
> > serial class.
> >
> > ...So we stay "on" topic in this board with the Q&A about RS422 and
> > the experiments to get the thing working for Emax ?
> >
> > ///E-Synthesist
> >
> > --- In emax@yahoogroups.com <emax%40yahoogroups.com>, mr julian
> <jujulilianan@> wrote:
> > >
> > > first up, I know NOTHING about the windows driver side of this... I
> > just
> > > installed a driver that was supplied with the firmware, and I can
> > see
> > > that in windows system, it's come up as a generic serial port, with
> > > settings for:
> > >
> > > Bits per second: (75-128000)
> > > data bits: (4-8)
> > > parity: (odd, even, none, mark, space)
> > > stop bits: (1, 1.5, 2)
> > > flow control: (Xon/Xoff, hardware, none)
> > >
> > > Also, I can open and close this port in hyperterminal, and adjust
> > the
> > > settings in hyperterminal....
> > >
> > > Now, I imagine that wheen it is connected to my PC, this port gets
> > > listed somewhere inside windows in an appropriate place, and
> > > applications looking for serial ports find its information, and can
> > then
> > > request to connect/disconnect, and and send config information -
> > just
> > > like any other serial port.... but if I needed to add extra
> > > functionality, like a synchronous BPS setting, I have no idea where
> > to
> > > put that... but maybe I could find out?
> > >
> > > I'm still waiting for the 422 chips, so will start seeing what I
> > can
> > > find out about the driver, and the application-driver interface,
> > plus
> > > the driver-board interface. and see what would need to be modified
> > to
> > > make this do exactly what we want.
> > >
> > > But yeah. my ideal finished product would be a USB connected board
> > that
> > > connects to a PC, and windows sees it as a standard serial
> > interface
> > > with standard interface parameters including synch/asynch control
> > > (whatever standard for that is!) and your program could therefore
> > > connect to it just like it would connect to any other serial
> > interface,
> > > and work with it the same way for any sampler....
> > >
> > > Also, I'm not interested in holding any kind of IP here - I'm
> > really
> > > just mucking about with configuration and possibly making small
> > > adjustments to existing open-source code...... if I create a
> > solution,
> > > I'll provide all assembly instructions/code completely open for
> > anyone
> > > who wants to use it however they wat.
> > >
> > > One thing - you already have EII comms working with a standard off
> > the
> > > shelf USB connector, don't you???
> > >
> > >
> > >
> > > anyway - we should probably take this discussion off-list. it's
> > getting
> > > a bit OT for the emax community in general I think.
> > > :-)
> > >
> > >
> > >
> > > esynthesist wrote:
> > >
> > > >OK :-)
> > > >What are the parameters that *can* be changed with the standard
> > > >driver ? Nothing ??? Isn't it possible to define parity, or
> > clocking
> > > >by software? If this is true, how can you change these parameters
> > > >then ? I'm not sure I understand.
> > > >
> > > >I mean: as soon as I can write a piece of C-code (based on sample
> > > >code provided by you of course ;-), which uses the standard USB
> > > >driver library, but which contains specific Emax code, that's fine
> > > >for me; then it's just a matter of writing another piece of code
> > for
> > > >each Emu sampler we want to support. I was not hoping for more.
> > > >But if the *hardware itself* is built in such a way that it only
> > > >supports the Emax, then we would need another piece of hardware
> > for
> > > >the Emulator II, and that would be a shame...
> > > >
> > > >But I guess it will all be software-driven, right ?
> > > >
> > > >///E-Synthesist
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
> 
>


[Non-text portions of this message have been removed]

Re: [emax] OT: Re: RS422 fun

2009-11-06 by Julian

On Thu, 05 Nov 2009 21:04 +0000, "gadgetfiddler"
<gadgetfiddler@...> wrote:
> have you considered utulizing the printer port on a pc to make the data
> transfer into the rs-422 port on the emaxII?
> I've got a cord with a male printer port plug on one side and a female
> serial port plug on the other.
> 

Are you sure it's an actual parallel to serial, or is it a serial DB25
to serial DB9? there is a standard for serial data on a 25 pin connector
(I have no idea why)


Anyway - the printer port won't work. we're talking very fast data rates
here.


I sent off a usb/422 adapter I'd made that works synchronously to
esynthesist  a while ago, but it turns out that while it passed the
simple test program I had, there are some issues with it... I haven't
had time to work on them since, but I have some time coming up in a week
or two to try and debug it on my side with a bit more information (and
my new oscilloscope! woo!)




-- 
http://bleepin.com

-- 
http://www.fastmail.fm - IMAP accessible web-mail

Re: [emax] OT: Re: RS422 fun

2009-11-06 by Ted Summers

I believe the 25 pin standard was due to the way that dumb terminals  
and printers were setup with hardware handshaking.
There are many combinations that can be used depending on length of  
wire, speed of connect, type of end device and type of host.
All vendors did not implement the same handshaking.

As time went on, the number of pins went down to nine as the  
handshaking became standardized and handshaking via software became  
more robust.

Regards,
Ted

On Nov 5, 2009, at 6:38 PM, Julian wrote:

On Thu, 05 Nov 2009 21:04 +0000, "gadgetfiddler"
<gadgetfiddler@...> wrote:
 > have you considered utulizing the printer port on a pc to make the  
data
 > transfer into the rs-422 port on the emaxII?
 > I've got a cord with a male printer port plug on one side and a  
female
 > serial port plug on the other.
 >

Are you sure it's an actual parallel to serial, or is it a serial DB25
to serial DB9? there is a standard for serial data on a 25 pin connector
(I have no idea why)

Anyway - the printer port won't work. we're talking very fast data rates
here.

I sent off a usb/422 adapter I'd made that works synchronously to
esynthesist a while ago, but it turns out that while it passed the
simple test program I had, there are some issues with it... I haven't
had time to work on them since, but I have some time coming up in a week
or two to try and debug it on my side with a bit more information (and
my new oscilloscope! woo!)

-- 
http://bleepin.com

-- 
http://www.fastmail.fm - IMAP accessible web-mail






[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.