Category : Files from Magazines
Archive   : OCT91.ZIP
Filename : 2N10053A

 
Output of file : 2N10053A contained in archive : OCT91.ZIP
@cplus = // VCR.CPP - VCR device driver class.
// VCR::VCR - Constructor for VCR
// VCR::~VCR - Destructor for VCR
// VCR::SendCommand - Send command string to VCR
// VCR::Stop - Puts the VCR into Stop mode.
// VCR::Eject - Causes the tape to be ejected from the VCR.
// VCR::Rewind - Places the VCR into full speed rewind.
// VCR::FastForward - Places the VCR into full speed fast forward.
// VCR::PlayFastReverse - Places the VCR into fast reverse play.
// VCR::PlayFastForward - Places the VCR into fast forward play.
// VCR::Still - Causes the VCR to Still on the current frame.
// VCR::Record - Begin recording mode.
// VCR::Play - Begins normal play mode.
// VCR::ReversePlay - Begins normal reverse play mode;
// VCR::StepForward - From a still frame, advance to next field.
// VCR::StepReverse - From a still frame, step to previous field.
// VCR::PowerToggle - Toggle VCR power.

#include "VCR.h"

/******************************************************************
* VCR::VCR - Constructor for VCR
*
* Parameters:
* int nNewPortAddress - default is address for COM1:
*
* Class Variables Used:
* SerialPort *spSerialPort;
*
* Returns:
* Nothing
*
* Notes:
* 1. Configures serial port to 9600 baud, 8 data bits,
* no parity, and 1 stop bit.
* Copyright:
* Original code by William H. Roetzheim (619) 669-6970
* Copyright (c) 1991 by William H. Roetzheim
* All rights reserved.
*
**********************************************************************/
VCR::VCR (int nNewPortAddress)
{
spSerialPort = new SerialPort (nNewPortAddress, "VCR");
spSerialPort->>SetBaud (9600);
spSerialPort->>SetBitsPerWord (8);
spSerialPort->>SetStopBits (1);
spSerialPort->>SetParity (NoParity);
}


/******************************************************************
* VCR::~VCR - Destructor for VCR
*
* Parameters:
* None.
*
* Class Variables Used:
* Port *SerialPort

@cplus = *
**********************************************************************/
VCR::~VCR ()
{
delete spSerialPort;
}



/******************************************************************
* VCR::SendCommand - Send command string to VCR
*
* Parameters:
* Str sCommandString - String to be output
*
* Class Variables Used:
* Port *SerialPort
*
**********************************************************************/
void VCR::SendCommand (Str sCommandString)
{
// Send start of command string character
spSerialPort->>OutChar (0x02);

// Send command string
int i;
for (i = 0; i << sCommandString.Length (); i++)
{
spSerialPort->>OutChar (sCommandString.Slice (i));
}

// Send end of command string character
spSerialPort->>OutChar (0x03);
}


/******************************************************************
* VCR::Stop - Puts the VCR into Stop mode.
*
* Notes:
* 1. This will abort any command in process, and stop
* any tape motion.
*
* 2. This command should not normally be used to terminate
* an assembly or insert edit. Stop will immediately
* stop the VCR, preventing a clean edit transition. Use
* Still instead to allow the VCR to establish proper
* sync at the edit out point.
*
* 3. The tape is left loaded on the head to allow quick
* resynchronization after a new play command.
*
* 4. Maximum command duration is 300 ms.
*
* 5. Audio and video are immediately placed into passthrough.
*
**********************************************************************/
void VCR::Stop (void)
{
SendCommand ("A@@");

@cplus = }


/******************************************************************
* VCR::Eject - Causes the tape to be ejected from the VCR
*
* Notes:
* 1. Reception of this command will abort any command
* in process, and eject the tape. If no tape is
* in the VCR, the command has no effect.
*
* 2. After a tape has been ejected, it can only be reloaded
* into the VCR manually.
*
* 3. Maximum command duration is 5 seconds.
*
* 4. Audio and video are immediately placed into passthrough.
*
**********************************************************************/
void VCR::Eject (void)
{
SendCommand ("A@A");
}


/******************************************************************
* VCR::Rewind - Places the VCR into full speed rewind
*
* Notes:
* 1. This is the fastest way to position the tape in the
* reverse direction. No audio or video is output during
* the rewind.
*
* 2. This command cannot be used if high accuracy is required.
* Since the tape is moved at high speed, minor errors in the
* frame count will result every time this command is executed.
* If high accuracy is required, the PlayFastReverse () command
* must be used instead.
*
* 3. Maximum command duration, 300 mSeconds to start rewinding.
*
* 4. Audio and video are placed into passthrough.
*
**********************************************************************/
void VCR::Rewind (void)
{
SendCommand ("A@B");
}


/******************************************************************
* VCR::FastForward - Places the VCR into full speed fast forward
*
* Notes:
* 1. This is the fastest way to position the tape in the
* forward direction. No audio or video is output
* during the fast forward.
*
* 2. This command cannot be used if high accuracy is
* required. Since the tape is moved at high speed,

@cplus = * minor errors in the frame count will result every time
* this command is executed. If high accuracy is required,
* the PlayFastForward () command must be used instead.
*
* 3. Maximum command duration is 300 mSeconds to begin fast
* forwarding.
*
* 4. Audio and video are placed in passthrough.
*
**********************************************************************/
void VCR::FastForward (void)
{
SendCommand ("A@C");
}


/******************************************************************
* VCR::PlayFastReverse - Places the VCR into fast reverse play
*
* Notes:
* 1. This mode moves the tape as fast as possible, while
* still providing a video picture. No audio is output
* during the motion.
*
* 2. This is the fastest way to move the tape in the reverse
* direction and still maintain high tape count accuracy.
*
* 3. The tape speed in this mode is 7X play (SP mode) or 21X
* play (SLP mode).
*
* 4. If very high accuracy is required, use of the CueToFrame ()
* command is preferred, since abrupt tape stops may cause minor
* count errors. Allowing the tape to run off the beginning
* may also cause errors in the tape count.
*
* 5. Maximum command duration is 300 mSeconds to begin play.
*
* 6. Video plays (with high speed noise bars), audio is muted.
*
**********************************************************************/
void VCR::PlayFastReverse (void)
{
SendCommand ("A@D");
}


/******************************************************************
* VCR::PlayFastForward - Places the VCR into fast forward play
*
* Notes:
* 1. This mode moves the tape as fast as possible, while
* still providing a video picture. No audio is output
* during the motion.
*
* 2. This is the fastest way to move the tape in the forward
* direction and still maintain high tape count accuracy.
*
* 3. The tape speed in this mode is 7X play (SP mode) or 21X
* play (SLP mode).
*

@cplus = * 4. If very high accuracy is required, use of the CueToFrame ()
* command is preferred, since abrupt tape stops may cause minor
* count errors. Allowing the tape to run off the end
* may also cause errors in the tape count.
*
* 5. Maximum command duration is 300 mSeconds to begin play.
*
* 6. Video plays (with high speed noise bars), audio is muted.
*
*
**********************************************************************/
void VCR::PlayFastForward (void)
{
SendCommand ("A@E");
}



/******************************************************************
* VCR::Still - Causes the VCR to Still on the current frame
*
* Notes:
* 1. The VCR will always attempt to provide a clean picture
* when executing this command. To establish correct video
* sync, up to three frames may be stepped through until
* the picture is free of noise bars. This command is also
* useful for turning on the video at the completion of
* a CueToFrame () command.
*
* 2. Maximum duration is 300 mSeconds to execute the command,
* but up to 1 second may be required to produce a noise
* free picture.
*
* 3. Video is displayed, audio is muted.
*

**********************************************************************/
void VCR::Still (void)
{
SendCommand ("A@F");
}



/******************************************************************
* VCR::Record - Begin recording mode
*
* Notes:
* 1. Attempting to record on a tape which has the erasure
* tab removed will cause the tape to be ejected from
* the VCR.
*
* 2. Maximum command time is 300 mSeconds.
*
* 3. The audio and video being recorded are output.
*
**********************************************************************/
void VCR::Record (void)
{
SendCommand ("A@H");
}

@cplus =



/******************************************************************
* VCR::Play - Begin normal play mode
*
* Notes:
* 1. Four seconds are required until playback begins from a
* full stop condition.
*
**********************************************************************/
void VCR::Play (void)
{
SendCommand ("A@J");
}



/******************************************************************
* VCR::ReversePlay - Begins normal reverse play mode
*
* Notes:
* 1. Four seconds are required until playback begins from
* a full stop condition.
*
**********************************************************************/
void VCR::ReversePlay (void)
{
SendCommand ("A@K");
}




/******************************************************************
* VCR::StepForward - From a still frame, advance to next field
*
* Notes:
* 1. A video frame consists of two fields. This command
* steps forward one field, so the frame counter advances
* after every other field step.
*
* 2. The VCR will automatically stop if left in still frame
* longer than 5 minutes without moving the tape.
*
* 3. This command requires 300 mSec. to execute.
*
* 4. Video is output, audio is muted.
*
**********************************************************************/
void VCR::StepForward (void)
{
SendCommand ("A@L");
}




/******************************************************************

@cplus = * VCR::StepReverse - From a still frame, step to previous field
*
* Notes:
* 1. A video frame consists of two fields. This command
* steps backward one field, so the frame counter decreases
* after every other field step.
*
* 2. The VCR will automatically stop if left in still frame
* longer than 5 minutes without moving the tape.
*
* 3. This command requires 300 mSec. to execute.
*
* 4. Video is output, audio is muted.
*
*
**********************************************************************/
void VCR::StepReverse (void)
{
SendCommand ("A@M");
}




/******************************************************************
* VCR::PowerToggle - Toggle VCR power.
*
* Notes:
* 1. This command toggles the VCR power on/off. Turning the
* VCR power off does not inhibit communication with the
* VCR serial processor.
*
* 2. RequestMode() can be used to determine if the VCR
* power is currently off.
*
* 3. Three seconds may be required to turn off the power if
* it is in the play mode.
*
* 4. Audio and video are muted.
*
**********************************************************************/
void VCR::PowerToggle (void)
{
SendCommand ("ACM");
}
// End of File


  3 Responses to “Category : Files from Magazines
Archive   : OCT91.ZIP
Filename : 2N10053A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/