DIY Fader Start - Game Port

I use a third-party component (ciaComPort), which most likely relies on the ordinary Microsoft APIs. It seems that Vincent should really try to open the port first.

Hi
It’s working with the next code:

To start (open) and set DTR ‘high’ ;

begin ComPort(1).SetParameters(9600, 8, 'N', 1); ComPort(1).Open; IOPort($3FC).WriteOR(1); end.

To stop (Close) and set DTR ‘low’ ;

begin IOPort($3FC).WriteAnd(254); end.

Thanks to Charlie Davy, Cad and Torben!

If you want fader/button-starts for mAirList (or any other radio playout program), here's how to do it...

You’ll need a 15way male D connector plus cover, 2x 47kohm resistors, some multicore cable - and whatever connectors your mixer requires. In order for Windows to “see” a joystick on the Game Port you will need to solder the 2 resistors to the back of the 15way connector. Some designs simply have these pins shorted, I’ve not tried it this way - but it appears to work OK.

Hi Charly Davy,
It’s working great now here in the studio but without the resistors at the gameport side (pin 1, 3 and 6 are schortened). With the resistors the computer does not see the ‘joystick’.

Vincent Volmer

[quote=“Vincent Volmer, post:22, topic:3886”]To start (open) and set DTR ‘high’ ;

begin ComPort(1).SetParameters(9600, 8, 'N', 1); ComPort(1).Open; IOPort($3FC).WriteOR(1); end.

To stop (Close) and set DTR ‘low’ ;

begin IOPort($3FC).WriteAnd(254); end.[/quote]
Hello Torben,

With the last version of mAirList, the script above is still working? I tried to build a new interface (with a optocoupler) for a new system with also the last version of mAirList (we’re using 2.31 for the script above …sry) but now I get only a ‘pulse’ at the start command… the inout32.dll is in the mAirList map. I don’t know if this is ‘normal’ now or that I need to change the script. I’m also afraid that the pulse would be to short.

I’m going to test the interface in the studio tonight but I ‘almost’ know for sure that I didn’t make a mistake with these ‘large’ amount of components :slight_smile: See:Interface

Regards,
Vincent Volmer

As far as I’m aware, there haven’t been any changes to the IOPort code since v.31 was released, so the script should work the same way as it did back then.

If you think that it stopped working, it would be helpful to known in exactly which version. You can download all older versions from the archive.

HAHA it definitively stopped working. I’m now in the studio and tried the new interface and it works good. So the problem is
(1) WindowsXP
We didn’t get all the updates from WindowsUpdate. This computer is NOT on the Internet (but the software is legal!! haha). The new computer has all updates…

or (2) mAirList
I need to check all versions… pffffft wanted to change all this weekend. Will do it next week.

Vincent.

You can do a binary search. The problem must have started somewhere between v.31 (good) and v.42 (bad).

  • Try v.36 first. If it works, try v.39. If it works, try v.40 or v.41.
  • If v.36 doesn’t work, try v.33 or v.34 next.
  • And so on.

This will reduce the number of versions to try from 10 to ceil(log2(10))=4.

Torben
soon-to-be Ph.D. in computer sciene :wink:

I tried them all ::slight_smile: v31 to 42… no problem :o
And I found it!!! yes yes yes… now it’s your turn :slight_smile:

Version 2.1.41 Build 454 is oke!
Problem starts with 2.1.42 Build 461 (this is the first version I have of .42)… Yes, I keep them all.

Torben soon-to-be Ph.D. in computer sciene ;)

I’ll drink some beer on that!!

VIncent

Well done! I’ll have a look at it as soon as possible.

I'll drink some beer on that!!

Save it for tommorrow. Tommorrow is the day :slight_smile:

Hello Torben,

Is this also fixed in .43? I can’t check it now so that’s why I’m asking :wink:
You didn’t write it in the announcement… (or I’m missing something)

Regards
Vincent.

No, it’s not fixed yet.

The problem is that you’re mixing two ways of accessing the interface - (1) by the Windows serial port routines (encapsulated by mAirList’s IComPort interface) and (2) direct access to the IO port. Generally, you should not do this, and it was some kind of luck that it worked in the previous versions of mAirList. As I have changed (or rather, cleaned up) the serial interface, it stopped working.

So you just need to set or clear the DTR? Luckily, the Windows interfaces do - of course - support this too, without direct access to the IO port. I just need to expose these functions in the IComPort interface.

Hello Torben,
Thanks for your answer…

I don’t know exactly the working of these ‘2 ways’ but it did work great! The shortest way is not always the best way to go :wink:

So you just need to set or clear the DTR? Luckily, the Windows interfaces do - of course - support this too, without direct access to the IO port. I just need to expose these functions in the IComPort interface.
When will that be implemented and documented (otherwise I need to downgrade to version 2.1.41 for time being, which I explained to you in a PM).

Regards,
Vincent

Let’s see, perhaps this evening :wink:

That would be perfect!!! ;D

And of course, thank you very much Torben!!

Ok, Build 489 is available for download now. There’s a new procedure “SetDTR(iValue: boolean)” which can be used to set or clear the DTR flag, so you just write

ComPort(1).SetDTR(false);

in order to clear the DTR at shutdown.

Please give it a try. I don’t have any serial equipment here, so I cannot try it myself.

[quote=“Torben, post:36, topic:3886”]Ok, Build 489 is available for download now. There’s a new procedure “SetDTR(iValue: boolean)” which can be used to set or clear the DTR flag, so you just write

ComPort(1).SetDTR(false);

in order to clear the DTR at shutdown.[/quote]
Thanks Torben,

I added an comport in the config and at starting mAirList the comport is ‘1’. Running the ‘script’ the comport goes to ‘0’. That’s a good start. Now i need to put the comport ‘1’ only when running a script/command in the playlist (start recording) not at starting mAirlist.

Please give it a try. I don't have any serial equipment here, so I cannot try it myself.

If you like I can send you the hardware (interface)…

Vincent

You don’t need to add the com port to the config (this is only necessary if you want to receive plain text commands to be executed by mAirList). This might also interfere with your script.

Just initialize the port from the script:

ComPort(1).SetParameters(9600, 8, 'N', 1);
ComPort(1).Open;

You can do this (plus a call to SetDTR, if needed) in the OnStartup procedure. In OnShutdown, close the port again:

ComPort(1).Close;

:-[ didn’t know that…

Just initialize the port from the script:

ComPort(1).SetParameters(9600, 8, 'N', 1); ComPort(1).Open;


Heee it’s working again!! Thank you Torben!

You can do this (plus a call to SetDTR, if needed) in the OnStartup procedure.
Not needed
In OnShutdown, close the port again:

ComPort(1).Close;

This closed the port.

I’m really happy… going to finish the buttons for the Preh-board and bring the system to the studio :slight_smile:

Thanks!!

:slight_smile: