I have both an RCX and an NXT. I would like to control the RCX brick from the NXT (and possibly communicate back to to the NXT from the RCX). I would like to avoid purchasing the Mindsensors RCX to NXT Communication Adapter which is no longer available in their store, and instead control the RCX via inputs to one of it's sensor ports via outputs from an NXT sensor port.

The physical connection can be achieved with the NTX to RCX converter cable but I am unsure how to control the output from the NXT sensor port to emulate any of the sensors that the RCX can recognise.

I found this post on another forum asking a very similar question, but the people who responded don't seem to have understood OP's intent, it is however worth a look for the illustrations.

This then is really a question about programming the NXT to gain fine control over the output from a sensor port to emulate a RCX sensor and if it is even possible.

I am open to solutions in any programming language/environment.