Upgrading serial port for higher speed / more midi stability

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

User avatar
Foxie
Captain Atari
Captain Atari
Posts: 354
Joined: Wed Feb 03, 2016 7:12 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby Foxie » Tue Feb 06, 2018 3:05 am

ranix wrote:Doesn't Cubase actually have pretty rock solid timing on Atari with one pair of MIDI ports, and the timing issues arise as a result of using expansions to get 3+ midi in/out ports? I assumed this was a limitation of the 8mhz Atari or of any i/o controllers or busses between the CPU and MIDI ports. If I understand correctly the onboard midi ports are connected to an ACIA chip with a fat pipe to the 68k (8 bit parallel? seems excessive, maybe something is in between). But as I understand it the CPU can pretty much drive this thing at ludicrous speed.


As far as I can tell with my tests under emulation, the problem is Cubase itself. It's horrendously inefficient! Someone else measured a 2ms MIDI thru delay (6x the theoretical minimum!), and I'm seeing only enough bandwidth to drive a single MIDI output. It's remotely possible that the problem is due to the cracked copy of Cubase I'm testing with, but I'm reasonably sure it will also plague the dongle version too. I would guess that the overheads of MROS have something to do with this. It could be written in a high level language?

The problem isn't anything to do with the MIDI interface devices used. Cubase delivers exactly the same timing characteristics whether it's driving a printer port device like the Friend Chip MM1 or the on-board ACIA MIDI out. With only one MIDI out driven, it's fine. I haven't tested the modem port yet, but I imagine it will be exactly the same. The problem is that at 8MHz, Cubase is simply too inefficient to search for the next MIDI event and deliver it in time. It can keep up with one port, but no more.

Going to 16MHz has a dramatic effect. It can now keep up with two ports easily, and sometimes as many as four. And at 32MHz you can saturate eight ports. I'm not sure why the performance gains seem to be so exponential. It could be that there's a static overhead that consumes most of the 8MHz CPU - but only a fraction of a faster CPU. The printer port is easily fast enough to drive eight ports - in fact it's not much slower than the bus used for the ACIA MIDI out. The cartridge port is actually quicker than even the ACIA. Although in practice, all the ports are more than fast enough to drive eight MIDI outs (actually more like 80 outs for the printer port, and a horrendous number for the cartridge port!). MIDI is only 3KB/s per MIDI out - the printer port is somewhere around 250KB/s and the cartridge port tops out around 4MB/s.

There is one area where cartridge port interfaces like Midex and Unitor fall down. There is no interrupt, so MIDI input needs to be polled. That will give you a jitter on all incoming MIDI events. I'm not sure how quickly Cubase polls Midex, but I would guess it's in the order of 0.3ms. It can't poll any less frequently because it would lose data. Maybe you can't hear 0.3ms, but it would be measurable. MIDI output on Unitor or Midex - in theory - can be perfect.

This is not to say that Atari musicians are imagining things. In most cases, an Atari even with sluggish Cubase will be tighter than an IBM compatible. That's partly because modern operating systems are so horrendous, and partly because modern ports like USB are just completely unsuitable for MIDI. Classic Macintoshes are even worse with their modem ports. It's amazing that anyone ever bothered buying those Macintosh 8 out 8 in interface devices with such a narrow pipe.

I am considering making my own sequencer. I'm not particularly interested in copying all the frilly features that Cubase 3 has - timing will be the primary focus. My objective is to attain 8 saturated MIDI outputs on an 8MHz Atari, and 0.32ms MIDI thru delay. If the MIDI handling is written tightly in assembly language, I reckon this should be achievable. I don't really know why Cubase can't - I suppose it was considered "good enough" at the time. After all, in 1992 music on the IBM and Macintosh was an absolute joke! I think also Cubase may have been designed around the concept of a single MIDI out, and later retrofitted with the code for multiple outs? Did the very early versions of Cubase (before it was called Cubase) support multi outs?

Meanwhile, my advice to Cubase users is to crank the CPU up as high as you can go. You probably need an accelerator with fast RAM or a cache to make any difference. The TT is the perfect Cubase machine from a performance standpoint. A MegaSTE at 16MHz would also be a big improvement over an 8MHz system. It really is possible to use a MIDI expander with those machines and maintain tight timing.

I'd be very interested to see some jitter and latency measurements from hardware like the MM1, Midex and Unitor. I've not done any testing with Notator, I wonder if it performs any better? I would guess that since they replaced Export with Log3, the program might be fast enough to drive those extra ports meaningfully. The best way to conduct such measurements is to make a MIDI to audio cable, and record the results on a multi-track recorder / computer of some kind.

If I can get my paws on a logic analyzer, I might try to attempt low-level tests with a genuine copy of Cubase on real hardware - but it's a bit tricky to pull off.

dbsys
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Aug 31, 2012 6:11 am
Location: Germany

Re: Upgrading serial port for higher speed / more midi stability

Postby dbsys » Tue Feb 06, 2018 7:35 am

I would like to make you aware of another MIDI Interface which can be hooked to Atari's parallel port. It is the Steinberg PC MIDI 3, a 1 in 3 out interface:

MIDI3_1.jpg


It was available for PC and Atari. The red ones were jumpered for Atari, the black ones for PC. It is the same board and internal jumpers can be set either way:

MIDI3_2.jpg


I have one and it works very well with Cubase.
You do not have the required permissions to view the files attached to this post.

User avatar
Foxie
Captain Atari
Captain Atari
Posts: 354
Joined: Wed Feb 03, 2016 7:12 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby Foxie » Tue Feb 06, 2018 1:05 pm

dbsys wrote:I would like to make you aware of another MIDI Interface which can be hooked to Atari's parallel port. It is the Steinberg PC MIDI 3, a 1 in 3 out interface:


Thanks! Would you mind sharing the Cubase driver for it? I'd be interested in doing some tests to reverse-engineer the protocol.

I'm thinking it would be trivial to include support for both the Friend Chip MM1 and Steinberg MIDI 3 protocols in one device, selected with a DIP switch. That way you could choose between 1-in/3-out or 0-in/8-out. Later, I might be able to figure out how to modify Cubase drivers enough to support 1-in/8-out. I was going to try and reverse-engineer the SMP24 protocol since that also offers MIDI inputs - but the MIDI 3 looks like it might be easier. The SMP24 has an awful lot of complexity to deal with matters like SMPTE.

It's interesting that it uses two MCUs. I'm guessing one is for input, and the other is for output. I wonder how they handle interrupt management between the two, or perhaps it doesn't give you transmit buffer empty interrupts.

dbsys
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Aug 31, 2012 6:11 am
Location: Germany

Re: Upgrading serial port for higher speed / more midi stability

Postby dbsys » Tue Feb 06, 2018 2:36 pm

Foxie wrote:
dbsys wrote:I would like to make you aware of another MIDI Interface which can be hooked to Atari's parallel port. It is the Steinberg PC MIDI 3, a 1 in 3 out interface:


Thanks! Would you mind sharing the Cubase driver for it? I'd be interested in doing some tests to reverse-engineer the protocol.

I'm thinking it would be trivial to include support for both the Friend Chip MM1 and Steinberg MIDI 3 protocols in one device, selected with a DIP switch. That way you could choose between 1-in/3-out or 0-in/8-out. Later, I might be able to figure out how to modify Cubase drivers enough to support 1-in/8-out. I was going to try and reverse-engineer the SMP24 protocol since that also offers MIDI inputs - but the MIDI 3 looks like it might be easier. The SMP24 has an awful lot of complexity to deal with matters like SMPTE.

It's interesting that it uses two MCUs. I'm guessing one is for input, and the other is for output. I wonder how they handle interrupt management between the two, or perhaps it doesn't give you transmit buffer empty interrupts.



Yes, I will upload the driver as soon as I get home later today.

dbsys
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Aug 31, 2012 6:11 am
Location: Germany

Re: Upgrading serial port for higher speed / more midi stability

Postby dbsys » Tue Feb 06, 2018 6:28 pm

dbsys wrote:
Foxie wrote:
dbsys wrote:I would like to make you aware of another MIDI Interface which can be hooked to Atari's parallel port. It is the Steinberg PC MIDI 3, a 1 in 3 out interface:


Thanks! Would you mind sharing the Cubase driver for it? I'd be interested in doing some tests to reverse-engineer the protocol.




Yes, I will upload the driver as soon as I get home later today.


Here we go:

ftp://ftp.steinberg.net/Archives/Atari/cubase/

The driver is: STMI3_5.DRV

It is included in the latest MROS which you can download from there.

User avatar
edingacic
Captain Atari
Captain Atari
Posts: 249
Joined: Mon Sep 07, 2015 5:16 pm
Location: Austria
Contact:

Re: Upgrading serial port for higher speed / more midi stability

Postby edingacic » Tue Feb 06, 2018 7:54 pm

Here is MM1 log (i think test was run on Falcon). I will run MO4 on my TT030 probably this week I was not in my studio yet.
You do not have the required permissions to view the files attached to this post.

User avatar
Foxie
Captain Atari
Captain Atari
Posts: 354
Joined: Wed Feb 03, 2016 7:12 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby Foxie » Tue Feb 06, 2018 9:58 pm

edingacic wrote:Here is MM1 log (i think test was run on Falcon). I will run MO4 on my TT030 probably this week I was not in my studio yet.


Thanks! The results look interesting so far - there's less buffering than I expected. I'm wondering what happens when you address multiple ports. Another test program would answer that, but it's not strictly necessary since I think I have enough information to keep the driver happy.

I think I'm reasonably certain now that the DIP switches are for daisy-chaining additional MM1s. But the MM1 driver doesn't support that - you'd need the Starport driver. I'm not sure if anyone is interested in daisy-chaining such a device anyway? 8 outputs plus the Atari output plus whatever you have in the cartridge and modem ports is already a lot of outs.




Thanks for that, I've had a quick look and I'm guessing the driver uses a nibble-wide protocol. The driver tries to detect the presence of the device and will show greyed-out in Cubase if it's not there. I should be able to figure out how to fool it into thinking the device is present, but it might be more difficult to figure out how MIDI input works.

I'd like to support some kind of MIDI input protocol since the printer port is the best way to get extra MIDI ins. It seems a waste not to exploit that feature?

dbsys
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Aug 31, 2012 6:11 am
Location: Germany

Re: Upgrading serial port for higher speed / more midi stability

Postby dbsys » Tue Feb 06, 2018 10:30 pm

Foxie wrote: I was going to try and reverse-engineer the SMP24 protocol since that also offers MIDI inputs - but the MIDI 3 looks like it might be easier. The SMP24 has an awful lot of complexity to deal with matters like SMPTE.


Are you aware of the Steinberg SMP II? It was the successor of the SMP 24, but follwed a different route. While the SMP 24 was a complete stand alone MIDI processing system, the SMP II only featured MIDI I/O and SMPTE I/O. It is probably a lot simpler to reverse-engineer.

SMP2_1.jpg

SMP2_4.jpg

SMP2_5.jpg


Here's the driver:
smp ii.zip
You do not have the required permissions to view the files attached to this post.

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2397
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Upgrading serial port for higher speed / more midi stability

Postby charles » Wed Feb 07, 2018 1:39 am

how does your input routine decipher data from the different ports?
is it kept in separate arrays for each port...considering data on channels 0-15 need to be sent using the midi format ?

would it be appropriate to make a suggestion ,,,,
with the ample abundance of ram storage nowdays on external devices raspberry pi ...arduino ..etc ....
would it make more sence to store a sequencer's midi data on external device storage (a new modernized smp midex etc )
,,then from within the program with one single command trigger the output ...so like somesort of external trigger to the device connected to serial port..midi port ,printer port......

ludicris I know ,,lol !
basically saying , instead of rewriting and modifying the old devices , make a new one
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2397
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Upgrading serial port for higher speed / more midi stability

Postby charles » Wed Feb 07, 2018 1:58 am

sure beats the old days of putting it on your watch and take it swimming with you idealology of computers..
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

ranix
Atari maniac
Atari maniac
Posts: 95
Joined: Sun Jan 14, 2018 8:01 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby ranix » Wed Feb 07, 2018 5:46 am

MIDI is a serialized, time-sensitive data stream so you normally process its events immediately (or as close to immediately as possible). MIDI messages say play a note now, not record and store information for later most of the time. Some CC values could be recorded and stored I guess but that's rare and interface-specific.

For example, you get a midi message that says I just moved the mod wheel a distance of -4, and we want to process that data and send it to the sequencer or DAW as soon as possible (preferably immediately) so it can move its internal representation of the mod wheel.

Pretty much all MIDI messages are this way, the receiving device wants to process them immediately. Handling the result of processing is the sequencer's job. Out of scope of the driver or the interface (in most cases)

That's why Foxie is talking about which ports on the Ataris are most useful for high-speed data transfer and which support interrupts. An interrupt can tell the processor to immediately handle an event instead of waiting for the program (Cubase) to poll the port to check the status. I think the Atari computers (the m68k itself?) can process multiple levels of interrupts that can override each other, even (7?)

Usually the interrupt routine will read from an asynchronous IO controller chip's buffer. The buffer may contain multiple MIDI messages, and the interrupt routine would process them in first-in, first-out order

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2397
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Upgrading serial port for higher speed / more midi stability

Postby charles » Wed Feb 07, 2018 11:24 am

thanks rainx , he might need to change the interrupt priority level with what ever programming language he uses then .
but I suppose he already knows this.
interupts are great ...the st tos is based on this most low level language users apply this approach...
there was a package known as midishare , would this have any usefull code for foxies experiment...?
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

User avatar
edingacic
Captain Atari
Captain Atari
Posts: 249
Joined: Mon Sep 07, 2015 5:16 pm
Location: Austria
Contact:

Re: Upgrading serial port for higher speed / more midi stability

Postby edingacic » Wed Feb 07, 2018 12:52 pm

does smpII work on TT030?

dbsys
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Aug 31, 2012 6:11 am
Location: Germany

Re: Upgrading serial port for higher speed / more midi stability

Postby dbsys » Wed Feb 07, 2018 1:56 pm

edingacic wrote:does smpII work on TT030?


Yes.
And on Falcon too.

User avatar
Foxie
Captain Atari
Captain Atari
Posts: 354
Joined: Wed Feb 03, 2016 7:12 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby Foxie » Wed Feb 07, 2018 7:46 pm

dbsys wrote:Are you aware of the Steinberg SMP II? It was the successor of the SMP 24, but follwed a different route. While the SMP 24 was a complete stand alone MIDI processing system, the SMP II only featured MIDI I/O and SMPTE I/O. It is probably a lot simpler to reverse-engineer.


Thanks, I'll have a closer look at how the drivers differ. Taking a guess, I would say the MIDI part of the SMP24 works the same way as the SMPII since that would save them having to re-engineer anything. Maybe the internal firmware is the same, just devoid of the user interface and therefore unable to utilise the dormant patchbay features?

I'd be interested to know whether the SMPII could be made to work in Pro24 - that would confirm whether the protocol is the same. Speaking of Pro24, I should get around to doing some MIDI performance tests to see how it compares to Cubase. Being simpler, I wouldn't be surprised if it were faster!

Any idea how much SMPIIs go for these days? They don't seem to be very common. It would be much easier to reverse-engineer one by hooking a logic analyzer up to it!

Interesting - I didn't know it was made by Waldorf. I don't think the Midex is made by them? I would hope it's pretty high-quality engineering with a name like that behind it. That said, the Midex looks pretty well-engineered too, a nicer design than the Unitor (although the MIDI performance of both should be identical). I was a bit puzzled why the Midex uses 150 ohm resistors on its optoisolators - that's not really MIDI spec compliant. But surely they had a reason, even if I can't fathom why!


charles wrote:how does your input routine decipher data from the different ports?
is it kept in separate arrays for each port...considering data on channels 0-15 need to be sent using the midi format ?


At the moment I've only implemented MIDI output for the Friend Chip MM1 and SoundPool MO4. The protocol for both is pretty simple, here's how the MM1 works:
10 Wait for busy line to go low
20 Write data byte, pulse strobe low and high
30 Write port number (0-7), pulse strobe low and high
40 Goto 20 until data for all 8 ports has been written
50 Goto 10 until all MIDI events have been written
The busy line will go high upon writing the first byte, but you can still write additional bytes for the other ports - but only one byte per port. The busy line stays high for typically 0.32ms, so you would normally use interrupts to catch it going low again since 0.32ms is too long to waste time polling for.

The SoundPool MO4 is similar, but slightly different:
10 Wait for busy line to go low
20 Write port selection byte, where you set bits 0-3 to select ports 1 (bit 0), 2, 3 or 4. Pulse strobe low and high.
30 Write data byte for first selected port (lowest number), pulse strobe low and high.
40 Goto 30 until all data bytes for the selected ports have been written. Not necessary if only one port was selected.
50 Goto 10 until all MIDI events have been written
I'm not totally sure how the busy line behaves on the MO4 yet. There is some limited buffering available - you can write two bytes for each port without checking the busy line.

Performance-wise, the SoundPool MO4 is a better design since it offers buffering. To fully utilise all ports of the MM1, you need a pretty fast response to interrupts. Or you could be really sneaky and set an MFP timer to interrupt you 0.32ms after writing data, minus the projected interrupt handling latency. Then you could poll until busy goes low in case the interrupt was handled faster than average.

I'm pretty amazed they managed to cram buffering into the SoundPool MO4 actually. It uses a tiny CPLD with probably only something like 64-128 registers. On the other paw, the Friend Chip MM1 seems to have enough logic to implement a one-byte buffer yet doesn't seem to do that.

As far as compatibility goes, I think the MM1 and MO4 should work fine on any system - including a CT60. There's no dependence on CPU speed to govern the timings, and the hardware is very fast. The Steinberg MIDI3 and the SMP24/II are a different matter - they use a CPU internally, so it's important to follow the timings exactly. It would be interesting to know if those devices work on a CT60 - if so, they must have used handshaking or an MFP timer to control the timings.

charles wrote:would it make more sence to store a sequencer's midi data on external device storage (a new modernized smp midex etc )
,,then from within the program with one single command trigger the output ...so like somesort of external trigger to the device connected to serial port..midi port ,printer port......


It's an interesting idea, and definitely a possibility if you want the tightest timing possible. Of course, you'd probably have to write to-the-metal code on the Raspberry Pi to make that possible - Linux is likely too inefficient to handle MIDI fast enough. But then, you could just slap a user interface on there and make a standalone Raspberry Pi MIDI sequencing box with no Atari needed.

It would be quite a lot of work since you'd need to implement USB and everything if you're going to throw Linux out. You could implement a MIDI interface device that way, with a printer port interface and some MIDI outs. Unfortunately, I'm not sure how to write to-the-metal code on the Raspberry Pi.

There are a handful of USB IBM compatible MIDI interface devices which take a slightly different approach. They use the sequencer to send the data to the device ahead of time, the device then takes care of controlling timing. This can give you extremely tight MIDI output timing. Unfortunately, it's plagued with problems in practice. There are all sorts of software compatibility problems which means that often time stamps don't get sent from your sequencer through to the device, negating the advantage. Some of those devices don't provide any time stamping for MIDI input, so your MIDI input has jitter all over the place. And AFAIK, none of the devices offer MIDI thru - so you have massive latency and jitter whenever you play the keyboard live. In theory all those problems could be solved by close cooperation between the sequencer developers and the hardware company, but that's about as likely as pigs flying. Sequencer developers these days seem to be focused squarely on software synthesisers and USB keyboards, and I wouldn't be remotely surprised if they remove external MIDI device support from them in the future. Logic's external MIDI device support these days seems to be relegated to a dark corner.

If that happens, the only way to get MIDI output will be to use a device like that thing made by Expert Sleepers which converts audio into MIDI. That can also give you very tight MIDI output timing, but only a single port. And forget about MIDI input and MIDI thru. Funnily enough it's an idea I thought of many years ago when USB was beginning to take over - but I decided the latency problems would make it pointless.

In terms of making a new interface device, that's pretty much what I'm planning. The device will attach to the printer port and will give you at least 2 MIDI inputs and 8 MIDI outputs - and it will be cheap to make using modern components. I could support that in my own MIDI sequencer, but people will also want to use it in Cubase. For that reason, I'm taking a two-pronged approach to Cubase compatibility. First, I'm going to implement support for the Friend Chip MM1 (and possibly Midi3 / SMPII) protocols in the hardware - selected with a DIP switch. When in this mode, it will work in Cubase with the existing driver. Secondly, I hope to learn enough about how Cubase drivers work to write a from-scratch Cubase driver which can take advantage of simultaneous MIDI input and output (the Friend Chip protocol only allows MIDI output). I can't promise anything in that regard since Cubase drivers are fairly complex and I have no documentation - but I'm slowly making some progress with disassembly.

Notator support is much trickier since it doesn't have a driver architecture. I'm not really sure how I could add support for a printer port device to Notator at all. It's remotely possible I could add support for a fast modem port interface to Notator, but then does anyone need that? If you install the Log3, it will take over from the modem port anyway. I could possibly make a clone of Unitor, and I'll look into that after I've done the printer port device. But I can't see a way of adding additional outs to Notator above what it already supports. It's a shame C-Lab/Emagic never added support for printer port devices, but I guess they wanted to sell their own expensive cartridge port devices.


edingacic wrote:does smpII work on TT030?


Did you need to modify your Midex to get it working with the TT? I know there's a mod for the Falcon which I assumed was for 68030 compatibility. But if it works with the TT without modification, I really have no idea why the Falcon mod is necessary. I heard there was some compatibility difference between the ST and Falcon cartridge ports, but I've looked at the schematic and can't find out why.

The good thing about the printer port is that it's identical between all Atari models. So barring some kind of compatibility problem in the driver (which could probably be patched), any printer port device should work on any Atari. The Firebee, I'm not so sure about. I tried e-mailing them to find out some technical specs on the Firebee's printer port, but haven't heard back. There could be some electrical differences between the Firebee and Atari which makes it incompatible with the SMP24/II and Midi3 - or even unsafe to attempt to connect it. But as far as I can tell, the SoundPool MO4 and Friend Chip MM1 will work on any printer port - even on an Amiga or IBM. The problem comes when you try to read data back from the device like the SMP24/II and Midi3 need - there could be a bus conflict unless the printer port is open-collector. IBMs don't have open-collector ports, and it's possible the Firebee might not either.

The Midi3 does have a set of jumpers to reconfigure it for the IBM, and in this case it would be safe to connect it. But of course it won't work with the Atari or Firebee if you jumper it that way, since the Atari lacks the additional four input pins the IBM has. That's also why you can't use IBM printer port rack mount interface devices on an Atari - they're simply incompatible at the hardware level. But funnily enough, you could use one of those 8-out/8-in Macintosh interfaces on an Atari with a LAN port. It just needs someone to write a suitable driver (but don't expect full 8-port maximum bandwidth performance, since no Macintosh interface can deliver that). Simple 1-out/1-in Macintosh interfaces already work with Cubase using LANPORT.DRV - and you can build your own with a few components.

I'm planning to write a simple MIDI patch bay program for the Atari, once I've learned how the various MIDI interface devices work. This will turn the Atari into a multi-input multi-output MIDI patchbay and merger. I'm not sure if anyone needs such a program, but I need to write it anyway - since the exact same code is an important part of a MIDI sequencer.

Progress so far:
Friend Chip MM1: I know enough to program it, and nearly enough to clone it 100%.
SoundPool MO4: I also know enough to program it, but I need to finish analyzing the data to clone it.
Midex: I know how it performs writes, but I need to figure out where the registers are mapped. Then it's possible to program it, and even clone it.
Unitor: Similar to the Midex, although I don't know how it performs writes yet.
Midi3: The only thing I know so far is that it's a nibble-wide protocol.
SMP24/II: No idea yet
Log3: Also unknown, but should be simpler than the SMP24/II and Midi3.

My focus at the moment is on the printer and modem ports - I'll only look into cloning the cartridge devices later. It's trickier because the speeds are higher, but also mechanically. I'd need to find someone who can make a suitable case which can fit in the cartridge port, which has quite particular mechanical requirements. My CAD skills are zero. It might also be tricky to find the 2mm connector the cartridge port uses.

I'm also keeping an eye on that project to clone the Cubase dongle. If they succeed, it would be interesting to have a single device which integrates the dongle and Midex. Probably don't even need the tricky-to-find cartridge port socket then, because there's no need to plug a dongle in. Of course Notator users will still need a dongle socket since I'm not aware of any project to clone the Notator dongle.


edingacic wrote:I have sent the file for MM1 testing and as soon as I get this data back I will post it here.


Would your friend be willing to run another test program on the MM1? There's just one more question I have about how the protocol works. This test will be much faster than the previous one, just a few seconds.
If not then I understand, and I think I already have enough information to make a more-or-less clone of the MM1.
His help as well as yours is very much appreciated so far!

User avatar
Atari74user
Captain Atari
Captain Atari
Posts: 300
Joined: Mon Aug 10, 2009 8:00 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby Atari74user » Wed Feb 07, 2018 8:19 pm

Thanks, I'll have a closer look at how the drivers differ. Taking a guess, I would say the MIDI part of the SMP24 works the same way as the SMPII since that would save them having to re-engineer anything. Maybe the internal firmware is the same, just devoid of the user interface and therefore unable to utilise the dormant patchbay features?

I'd be interested to know whether the SMPII could be made to work in Pro24 - that would confirm whether the protocol is the same. Speaking of Pro24, I should get around to doing some MIDI performance tests to see how it compares to Cubase. Being simpler, I wouldn't be surprised if it were faster!


The SMPII uses firmware v1.6x, SMP24 uses v1.4x. SMP24 as you allude was designed to work with Pro 24, and SMPII with Cubase, hence why people now tend to upgrade their SMP24s to firmware v1.6x. I am sure you could 'downgrade' the SMPII to work with Pro 24, but of course that's a guess: http://atari-forum.com/viewtopic.php?t=26529

I am sure I had the firmware for v1.6x somewhere, as I almost bought an SMP24, however I cannot find it. I waited out for an SMPII, superficially I liked it's look more, I waited for a long time, managed to get mine last year for about £100, but I was really fortunate. SMP24s are quite scarce as you would imagine, SMPIIs seemingly more so.
Atari Falcon 14mb, 68882, Dual 8gb CF, Steinberg FDI & Analog 8
Atari Jaguar, Rotary controller, Skunkboard & Cat Box
Atari 520STFM 4mb, TOS 2.06 switcher, OverScan, GigaFile, PARCP-USB, Unicorn-USB, System Solutions MiniS HD, SyQuest drives, ICD Link II, PhatBoy MIDI Controller, Philip Rees 5M MIDI merge box, SoundPool MO4, Steinberg MIDEX, SMP II, Emagic Log 3, C-Lab Unitor 2, Combiner & Export expanders

guus.assmann
Atari freak
Atari freak
Posts: 65
Joined: Tue Dec 13, 2005 10:34 pm
Location: Ede Netherlands

Re: Upgrading serial port for higher speed / more midi stability

Postby guus.assmann » Wed Feb 07, 2018 8:46 pm

Hello Foxie,
Yes, I did figure out (for a bit) what it does.
It inserts an extra wait-state in the handling of a command.
BR/
Guus
Guus Assmann

ranix
Atari maniac
Atari maniac
Posts: 95
Joined: Sun Jan 14, 2018 8:01 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby ranix » Wed Feb 07, 2018 9:26 pm

Foxie wrote:My focus at the moment is on the printer and modem ports - I'll only look into cloning the cartridge devices later. It's trickier because the speeds are higher, but also mechanically. I'd need to find someone who can make a suitable case which can fit in the cartridge port, which has quite particular mechanical requirements. My CAD skills are zero. It might also be tricky to find the 2mm connector the cartridge port uses.


I think you're talking about what I'd call a "card edge" connector. Normally you just hang the PCB out the side of the enclosure and design the card edge onto the PCB itself. An enclosure isn't strictly required and many people make cards with no case at all. The tricky part is getting the board thickness correct. The edge pins themselves are usually 100 pitch landing pads on both surfaces of the board

User avatar
Foxie
Captain Atari
Captain Atari
Posts: 354
Joined: Wed Feb 03, 2016 7:12 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby Foxie » Thu Feb 08, 2018 12:38 am

Atari74user wrote:The SMPII uses firmware v1.6x, SMP24 uses v1.4x. SMP24 as you allude was designed to work with Pro 24, and SMPII with Cubase, hence why people now tend to upgrade their SMP24s to firmware v1.6x.


So you can use the firmware from the SMPII on the SMP24, or is there a special 1.6 release just for the SMP24? If you can interchange them, they must be nearly identical at the hardware level.

Atari74user wrote:I am sure I had the firmware for v1.6x somewhere, as I almost bought an SMP24, however I cannot find it. I waited out for an SMPII, superficially I liked it's look more, I waited for a long time, managed to get mine last year for about £100, but I was really fortunate. SMP24s are quite scarce as you would imagine, SMPIIs seemingly more so.


Do you use yours for SMPTE and MIDI input, or just the extra MIDI outs? If people are only using them for MIDI outs, then I guess there's no point trying to reverse-engineer the protocol - because the Friend Chip MM1 protocol already gives 8 outs.

Personally I could make use of an extra MIDI input or two, but there are other ways of getting that (like using a MegaSTE or SCC mod in conjunction with a Macintosh MIDI device). In principle I could just use a massive MIDI merger to combine every MIDI source into the Atari's MIDI input, but MIDI mergers always add a minimum of 0.32ms delay - and some are worse.


guus.assmann wrote:Hello Foxie,
Yes, I did figure out (for a bit) what it does.
It inserts an extra wait-state in the handling of a command.
BR/
Guus


Does that mean it skips two accesses between reading the "magic register" at $fa0030 and writing data? Or is it something to do with handling the 16MHz bus of the Falcon? (if the latter, I imagine switching the CPU to 8MHz would make it compatible?)


ranix wrote:I think you're talking about what I'd call a "card edge" connector. Normally you just hang the PCB out the side of the enclosure and design the card edge onto the PCB itself. An enclosure isn't strictly required and many people make cards with no case at all. The tricky part is getting the board thickness correct. The edge pins themselves are usually 100 pitch landing pads on both surfaces of the board


The annoying thing about the ST's cartridge port is they used a funny connector - it has a 2mm pin spacing rather than 0.1". That's no problem for making a PCB to plug into the Atari, but I'd need to include a socket for accepting the Cubase/Notator dongle. I'm not sure if anyone still manufactures those sockets? I know they didn't include one on the Firebee, which raises an alarm concerning its availability.

I suppose these days it might be possible to 3D print such a connector, then remove the metal springs from a 0.1" edge connector and slide them into the 3D printed shell. But that would surely require a CAD expert.

Do you know what thickness of board is required?

ranix
Atari maniac
Atari maniac
Posts: 95
Joined: Sun Jan 14, 2018 8:01 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby ranix » Thu Feb 08, 2018 2:22 am

yeah I can find out, I have calipers around here somewhere

I'm sure someone's come up with an inventive way of mating with a 2mm spacing card edge if we can't get those connectors anymore

maybe it would be easier if you plug it in from the top instead of the side

ranix
Atari maniac
Atari maniac
Posts: 95
Joined: Sun Jan 14, 2018 8:01 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby ranix » Thu Feb 08, 2018 3:11 am

looks like 63mil / 1.6mm

ranix
Atari maniac
Atari maniac
Posts: 95
Joined: Sun Jan 14, 2018 8:01 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby ranix » Thu Feb 08, 2018 3:56 am

you're right dude, these things are totally ghost. I can't find them anywhere on the internet. 2.0mm 2x20 card edge connector

I'd hit up Best Electronics and see if they have any

User avatar
Foxie
Captain Atari
Captain Atari
Posts: 354
Joined: Wed Feb 03, 2016 7:12 pm

Re: Upgrading serial port for higher speed / more midi stability

Postby Foxie » Thu Feb 08, 2018 12:58 pm

ranix wrote:looks like 63mil / 1.6mm


Thanks, that seems to be pretty standard.

ranix wrote:you're right dude, these things are totally ghost. I can't find them anywhere on the internet. 2.0mm 2x20 card edge connector

I'd hit up Best Electronics and see if they have any


I found this thread, looks like Best Electronics might be a source, along with B & C computervision. How many they have in stock, I have no clue.
viewtopic.php?f=15&t=32692&p=336215&hilit=cartridge+connector#p336215

I came close to finding a suitable new connector, but unfortunately it has got a keyway so can't accept ST cartridges. It's also surface mount which is a real problem (no way of accessing the pins for hand-soldering, need a reflow oven). The part is listed on RS if you narrow the search by 2mm pin pitch and 40 contacts. In the worst case, it may be possible to cut the keyway out of the connector, and then solder ribbon cable to the bottom of the connector to avoid reflow soldering. Or get the Chinese to do the reflow soldering cheaply in their ovens.

ranix wrote:maybe it would be easier if you plug it in from the top instead of the side


That would probably be good for Cubase users, it would allow the entire side of the cartridge to be used for MIDI ports. Notator is a bit trickier because you'd probably want to plug Log3 into it. I think it would be too mechanically unstable with a cartridge that large hanging out the top!

Surely the best option would be to build the actual dongle into the device itself, but that's entirely dependent on the dongle reverse-engineering project succeeding (I wouldn't know where to begin with a project like that).

User avatar
edingacic
Captain Atari
Captain Atari
Posts: 249
Joined: Mon Sep 07, 2015 5:16 pm
Location: Austria
Contact:

Re: Upgrading serial port for higher speed / more midi stability

Postby edingacic » Thu Feb 08, 2018 2:43 pm

Would your friend be willing to run another test program on the MM1? There's just one more question I have about how the protocol works. This test will be much faster than the previous one, just a few seconds.
If not then I understand, and I think I already have enough information to make a more-or-less clone of the MM1.
His help as well as yours is very much appreciated so far!



Hi Foxie, Yes please do send the test files and I'll let him know. I am sure he can do it. I will be testing MO4 on TT030 pretty soon also. Midex+ works fine on my TT030 I did not have to modify anything there is a driver MIDEXTT.DRV

Whatever you decide to do timing is the biggest priority i think.

User avatar
edingacic
Captain Atari
Captain Atari
Posts: 249
Joined: Mon Sep 07, 2015 5:16 pm
Location: Austria
Contact:

Re: Upgrading serial port for higher speed / more midi stability

Postby edingacic » Thu Feb 08, 2018 2:55 pm

I also have SMP 1.6 Firmware if you need it


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 8 guests