Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vc(3) — NEWS-os 4.2.1R

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vvcrs(4)

VC(3)  —  NEWS-OS Programmer’s Manual

NAME

vc − NWB-226 VTR Controller Library

SYNOPSIS

#include <newsvme/vvcrsreg.h>
cc [ flags ] files −lvc

DESCRIPTION

The function of the VTR controller basic library is consists of 3 elements; the function based on the ‘9 pin RS−422 connecter protocol’, user support function and freeze function. 

ARGUMENT

char ∗strings;/∗ character strings ∗/
int chan;/∗ channel number ∗/
int data;/∗ data ∗/
int dir;/∗ fwd or rev ∗/
int error;/∗ error number ∗/
int exec;/∗ execute request flag ∗/
int fd;/∗ file descripter ∗/
int in_out;/∗ in/out flag ∗/
int line;/∗ number of lines ∗/
int r_tc[4];/∗ answer from time code data request command ∗/
int r_tu[8]/∗ result of current time sense command ∗/
int rdata;/∗ timer mode data ∗/
int s_dir;/∗ direction of shift ∗/
int s_tc[4];/∗ time code added on the sending command ∗/
int sdata[];/∗ status data ∗/
int switch;/∗ on/off mode ∗/
int ttype;/∗ time code type ∗/
int b;/∗ BCD (Binary Coded Decimal) ∗/
int d;/∗ decimal ∗/
struct vcio vcio;/∗ structure vcio ∗/

stringsSpecify the strings to be displayed by ‘char display’ command. 

chanSpecify the channel number (0 or 1) to be opened. 

dataThe data which should be given from user by the command of "9-pin RS−422 connecter protocol".  The details for each data, refer to the Operation Manual of "9-pin RS−422 connecter protocol". 

dirChange the forward or reverse direction.  If dir is 0, ‘forward’ direction will be selected.  If dir is 1, ‘reverse’ direction will be selected. 

errorThe error code which is returned after the function is executed. 

execThe flag for the execution request. 

fdThe file descripter which is returned from vtr_open function. 

in_outChange the function of the command for IN POINT or for OUT POINT.  If ‘0’ is specified the IN POINT will be selected, and if ‘1’ is specified the OUT POINT will be selected. 

lineCorresponds to the number of the command ‘char display[1−8]’ of "9-pin RS−422 connecter protocol". 

r_tc[4]The following data will be returned as the answer of the time code request command. (decimal)

r_tc[0]frame
r_tc[1]second (0 − 59)
r_tc[2]minute (0 − 59)
r_tc[3]hour (0 − 23)

The data returned to r_tc[0] may be added the data (drop frame, color frame mode bit) on the place of 6 and 7 bit translated into BCD code. (see s_tc[4])

r_tu[8]The data which is gotten by the execution of the current time sense command. 
The r_tu[0] − r_tu[3] for time data, and r_tu[4] − r_tu[7] for user bit data will be returned. According to the method to specify, one or both of the data will be returned.

rdataThe data which is gotten by the execution of the timer mode sense command. 

s_dirIndicates the direction to shift.  If s_dir is 0, ‘+’ will be selected, and if s_dir is 1, ‘−’ will be selected. 

s_tc[4]Specify the time code to be add to the request command. (decimal)

s_tc[0]frame
s_tc[1]second (0 − 59)
s_tc[2]minute (0 − 59)
s_tc[3]hour (0 − 23)

In case of the data ‘s_tc[0]’ to specify the frame number, 6th bit is the drop frame mode bit, and 7th bit is color frame mode bit.

drop frame mode 1
non drop frame mode 0
color frame mode1
non color frame mode0

sdataThe data which is gotten by the execution of the status sense command. 

switchSpecify the mode on or off.  If switch is ‘0’, the mode will be off, and if switch is ‘1’, the mode will be on. 

ttypeSpecify the type of the time code to be used by the one of the following method. 

VC_LTCLongitudinal Time Code
VC_VITCVertical Interval Time Code
VC_TIMER1Timer−1
VC_TIMER2Timer−2

bSpecify BCD (Binary Coded Decimal) number

dSpecify decimal number

vciostructure ‘vcio’

Function based on the 9-pin RS−422 Connecter Protocol

The functions marked with ∗ is fixed the ‘exec’ argument to 1.

vtr_amode(fd, switch, exec)auto mode on/off
vtr_autoed(fd, exec)auto edit mode
vtr_cdisp(fd, line, strings, exec)character display
vtr_ctsense(fd, data, r_tu, exec)current time sense ∗
vtr_cueup(fd, s_tc, exec)cue up with data
vtr_dpset(fd, in_out, s_tc, exec)in/out data preset
vtr_edit(fd, switch, exec)edit on/off
vtr_entry(fd, in_out, exec)in/out entry
vtr_epset(fd, data, exec)edit preset
vtr_hselect(fd, data, exec)head select
vtr_icheck(fd, exec)input check
vtr_indsense(fd, r_tc, exec)in data sense ∗
vtr_outdsense(fd, r_tc, exec)out data sense ∗
vtr_play(fd, exec)play
vtr_prev(fd, exec)preview
vtr_ptpset(fd, s_tc, exec)preroll time preset
vtr_rec(fd, exec)rec
vtr_review(fd, exec)review
vtr_roll(fd, exec)preroll
vtr_shift(fd, in_out, dir, exec)in/out +/- shift
vtr_shuttle(fd, dir, data, data, exec)shuttle fwd/rev
vtr_srselect(fd, data, exec)servo ref select
vtr_statsense(fd, data, sdata, exec)status sense ∗
vtr_stdby(fd, switch, exec)stanby on/off
vtr_stop(fd, exec)stop
vtr_taselect(fd, data, exec)tape/auto select
vtr_tcdsense(fd, data, r_tc, exec)tc gen data sense ∗
vtr_tcpset(fd, s_tc, exec)time code preset
vtr_tmselect(fd, data, exec)timer mode select
vtr_tmsense(fd, &r_data, exec)timer mode sense ∗
vtr_tpset(fd, s_tc, exec)timer−1 preset
vtr_trecpset(fd, data, exec)delta-t rec preset
vtr_treset(fd, exec)timer−1 reset
vtr_wind(fd, dir, exec)fwd/rew

USER SUPPORT FUNCTION

vtr_btod(b)convert BCD number to decimal number
vtr_close(fd)close library
vtr_dtob(d)convert decimal number to BCD number
vtr_fcancel(fd, e)freeze cancel
vtr_freeze(fd, ttype, s_tc, exec)freeze
vtr_gfstat(fd)get freeze status
vtr_load(fd)load and run firmware program
vtr_open(chan)open library
vtr_perror(error)print error message

ERROR

If the execution is successful, 0 will be returned, and otherwise the error code will be returned. 

SYSTEM ERROR

When a system error occurs, the error code −1 will be returned and the error number will be set on the global variable ‘errno’. 

[ENXIO]The minor number of the device was not valid. 
The interface board NWB−226 was not connected correctly.
The command vtr_freeze() or vtr_fcancel() was issued while the interface board NWB−224 is not connected. 
The program of the farmware was not work correctly.

[EBUSY]An attempt was made to open the channel which was already opened. 
The reset, run or load command was attempt to the executing program by the other process.

[EINVAL]The specified parameter was not valid. 
The address was not correct.

[EIO]An attempt was made to access the process which is different from the one that is open the device. 

[EINPROGRESS]The command other than vtr_fcancel() was issued to the channel that is requested to freeze. 

[EFAULT]The address of the specified parameter was incorrect.

ERROR ON BASIC LIBRARY

If the error of VTR control interface board NWB−226 or VTR was occurred, the following value will be returned from the basic library. 

ERROR of VTR ch-A [bit 0 − 15]

     bit 0 − 7error data

     bit 8 − 10error type

     bit 11 − 15no use

ERROR of VTR ch-B [bit 16 − 31]

     bit 16 − 23error data

     bit 24 − 26error type

     bit 27 − 31no use

TYPE of ERROR

bit indicated where the error occurred

     bit 8,24VTR error

     bit 9,25error that is occurred with NWB−226

     bit 10,26error that is occurred while freezing

ERROR DATA

The contents will be different according to the bit indicating the type of the error. 

When bit 8 and 24 is ON (VTR error)
For the description for each bit, see NAK command section of the "9-pin RS-422 connecter protocol" manual.

When bit 9 and 25 is ON (error occurred with NWB−226)

     bit 0, 16undefined command

     bit 1, 17−

     bit 2, 18check sum error

     bit 3, 19−

     bit 4, 20parity error

     bit 5, 21over-run error

     bit 6, 22framing error

     bit 7, 23time out

When bit 10 and 26 is ON (error occurred while freezing)

     bit 2, 18error in the freeze control

     bit 4, 20frozen time code was less than the current time code. 

     bit 5, 21time code could not be read

     bit 6, 22other error code

SEE ALSO

vvcrs(4)
 
9-pin RS−422 connecter protocol manual
 
VTR control interface board NWB−226 Software Manual
 
Chapter 13. vvcrs library in NEWS-OS Release 4.0 Programmer’s Guide.
 
Chapter 18 VTR control interface in NEWS-OS Release 4.0 I/O Device Programming Guide.

NEWS-OSRelease 4.2.1R

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026