videodisc(status player) videodisc(status playerType) videodisc(still) ound color videodisc(set background color videodisc(reject) videodisc("reject") If the the player is in any play mode or in pause, stops the rotation of the disc. If the disc is already stopped or there is no disc, opens the door. To stop the disc without risk of ejecting it, use video("stop") Example -- stop then eject the disc get videodisc("reject") get videodisc("reject") videodisc(Step) videodisc(status time) videodisc("status time") videodisc("status chapter") Returns the current chapter or elapsed time for CLV discs. Note: videodisc(reject) videodisc(step) ideodisc(Step re videodisc("step") videodisc("step reverse") Steps by one frame from the current frame and leaves the player in still mode. videodisc(stop) ideodisc(reject) videodisc("stop") videodisc("reject") Both forms of this function call have the same effect. Stops the spinning of the disc. On most players, the video picture is replaced by a blank background. On Pioneer players, calling this function when the disc is already stopped also ejects the disc. You might want to check the player status with videodisc("status player") before calling videodisc("stop") to avoid unexpected opening of the player's door. videodisc(pause) videodisc("pause") Stops the playing, but leaves the laser arm at the current frame position. The picture disappears (except on LD-V8000). videodisc(status keydata) videodisc("status keydata") Returns the key (user) data embedded on the disc, if any. Does not work on the LD-V2200. If no data is available, returns null.""""""""not availabe, videodisc(open) videodisc(status ) videodisc(play [from ] [to c(Scan) videodisc(Scan R videodisc(Scan)videodisc(Scan Re videodisc(status frame) videodisc(set key lock videodisc(stop) videodisc(set port videodisc(set speed videodisc(status time) videodisc(select audio videodisc(set stop [frame|chapte videodisc(status disc) videodisc(stop)videodisc(reject) videodisc(initialize) videodisc(status keydata) videodisc(play [from ] [to Starts playing from the current position. If the disc is stopped, starts playing from frame 1. The playing stops when a stop mark is encountered. The for the optional from and to arguments is either a frame number, or the word chapter followed by a number. The optional speed parameter is a number from 1 to 255. If it is omitted, normal play speed is assumed. Examples: get videodisc("play") get videodisc("play, 240") -- at 6 times normal speed get videodisc("play reverse") -- at normal speed, but in reverse get videodisc("play from 2345 to 2378", 10) -- at 1/6th normal speed get videodisc("play to chapter 2") videodisc("play [from ] [to ] [reverse], []) disable "Previous" enable adjust x --** -- reset proportions moved objs -15, -15, -15,\ -15, -15, -15, - 15,\ defBounds setCaption what 0,50.1875,0 nterpage adjust setCaption previous disable enterpage enable enterpage ox%disable Previous enable Previous previous adjust defBounds setCaption disable enable 0,0,0 title odefBounds adjust buttonUp buttonDown buttonUp buttonDown defBounds adjust 6 defBounds 5670,4680,6885,5085 Go Back default odefBounds adjust buttonUp buttonDown buttonUp default buttonDown defBounds adjust defBounds 30,4650,1395,5085 Demo Previous odefBounds adjust buttonUp buttonDown buttonUp previous buttonDown defBounds adjust defBounds 3090,4680,4305,5085 Previous odefBounds adjust buttonUp buttonDown buttonUp buttonDown defBounds adjust defBounds 4410,4680,5580,5085 Next Reference /"reference" odefBounds adjust buttonUp buttonDown buttonUp reference buttonDown defBounds adjust defBounds 1485,4665,2715,5085 Reference The script of this book contains a general purpose function to control a videodisc player. This specific book is dedicated to the Pioneer LD-V2200 player; it also works with the LD-V4200 and the LD-V8000. Another book with the same function could control another board. The script, controls and features of the first page are included as examples of the kinds of things you can do by calling the function in the script of this book. Typically, the way to use this book is by including it in the system variable sysBooks to make its functions available to your application. For instance, the enterBook handler in the script of your application book could contain the statement "push LD-V2200.TBK onto sysBooks". You can use more than one system book at the same time; for instance, another system book could contain the functions to control a videodisc player, and yet another one could contain handlers and functions for a test scoring system. ions for a test scoring system. How to use this book with your application All video control is through one function, videodisc , which you call with different arguments. A typical call to video is in the form get videodisc[, ]) Some of the calls require the parameter; a few don't. See the reference section of this book for details. Function calls to videodisc return 1 if successfull or a negative number if they failed. Typical causes of errors would be that videodisc("open") was not called successfully earlier in the session, or that one of the arguments to the function was illegal or out of range. This function also uses an auxiliary DLL, TBK-COMM.DLL which is available on the Asymetrix BBS. Videodisc Control videodisc(select audio parameter is 0 for no audio, 1 for channel 1, 2 for channel 2, and 3 for stereo. evel is set to the current audio level. video("fade in") sets it to 255 , and video("fade out") sets it to 0 . videodisc("select audio",) videodisc(status playerType) videodisc("status playerType"))>") Returns information on the player type. If the function recognizes the player's code, it returns a manufacturer and model number as well as the code, otherwise it returns only the code. Example: get videodisc("status playertype") if it contains "Pioneer LD-V2200" return true else request "Oops. That's not a LD-V2200!" return false -- Script demo -- Last rev. 6/4/90 HC.O. ooldBSize defSize 5805,840 5805,840 enable "help" odefBounds <> videodisc("Open", defcomport 8) < 0 "Cannot initialize the =. Video controls will have"\ && "no effect." default 4s_inHelp s_videodisc_init <> Stop") Close") "frame" "chapter" exitHelp "5805,840" defsize setControls 4s_discType, s_discControls "CLV" "Time" "CAV callouts" "Frame" 4s_suspend_fr, s_suspend_ch, s_videoDisc_init, <> " <> "CAV" status c":" isNumber( "No response" "Videodisc player off disconnected."\ && "Closing driver. doHelp disable defbounds ExitHelp activateInstance Manother instance same mode -- but we are activating 5which -- Special stuff maintain correct proportions, etc. buttons -- on cauthoring adjust x --** -- reset moved objs -15, -15, -15,\ -15, -15, -15, - 15,\ setCaption what 0,50.1875,0 z cpT vePage doHelp ExitHelp enterPage activateInstance setControls adjust setCaption disable leavePage enable enterPage oldBSize defSize enable reader defBounds defBounds sizeToPage defcomport videodisc Cannot initialize the videodisc. Video controls will have no effect. default leavePage Close videodisc frame chapter cpexitHelp 5805,840 defBounds defsize sizetopage s_inHelp setControls frame or time help frame or time CLV controls CAV callouts CLV callouts frame or time Frame help frame or time Frame CLV controls CLV callouts CAV callouts s_discType s_discControls chapter frame chapter frame status disc videodisc status time videodisc frame status frame videodisc isNumber frame setControls No response Videodisc player off or disconnected. Closing driver. Videodisc controls will have no effect. Close videodisc status chapter videodisc isNumber chapter default s_suspend_fr s_suspend_ch s_videoDisc_init s_discType doHelp ox%disable defbounds defSize sizeToPage default s_inHelp ExitHelp defSize defbounds enable default s_inHelp activateInstance defSize cpExitHelp s_inHelp adjust defBounds setCaption disable enable 0,0,0 8b9j:f;` x2 x < x1 B"speed thumb" "keypad" buttonup buttondoubleclick buttonup buttonDown speed thumb buttonStillDown speed thumb buttonUp speed thumb HitPos buttondoubleclick :PHYSSIZE speed thumb "slider" -- stores a bunch dimensions %private receives the "Calibrate" message -- Can itself a " detects error PaintObject "Sweep Track" <> otBounds otrack -- I will never oWidth oxOffset "glide minTrack + 135 maxTrack - 150 omaxX ominX -- there are 9 "zones" on zoneWidth ) / 17 2* i) + 65000 ) /2) + goPosition x x = "play" + 15) / 17 * (x-1)) + p= 1 oLastZone ,x)), = 1 = 17 = 2 = 16 = 3 = 15 = 4 = 14 = 5 = 13 "1/2" = 6 = 12 "1/3" = 7 = 11 "1/4" = 8 = 10 "1/6" = 1 = 17 = 2 = 16 = 3 = 15 = 4 = 14 = 5 = 13 = 6 = 12 = 7 = 11 = 8 = 10 videodisc("still") < 9 reverse", librate buttonDown goPosition buttonstilldown Calibrate buttonUp buttonDown Sweep Track tBounds track Sweep Track }Calibrate Calibrate Width xOffset Width tBounds track tBounds tBounds xOffset xOffset zones zones zones zoneWidth maxTrack minTrack goPosition xOffset zoneWidth buttonstilldown zones LastZone xOffset buttonUp LastZone still videodisc videodisc videodisc play reverse videodisc -.-zones 65000,4729,4614,4498,4383,4267,4151,4036,3920,3805,3689,3574,3458,3342,3227,3111,2996 -LastZone -minX 2842.5 -maxX 4807.5 -tBounds 2745,60,4995,345 .xOffset 8...Width L.B.y Z.track paintobject id 28 of page id 17 /:PHYSSIZE speakers "stereo" right stereo *3:PHYSSIZE 4:PHYSSIZE 4:PHYSSIZE v5:PHYSSIZE goPosition "still" B"Speed Thumb" videodisc("reject") door") buttonUp buttonUp goPosition still Speed Thumb reject videodisc open door videodisc videodisc("Init") goPosition "still" B"Speed Thumb" buttonUp buttonUp videodisc goPosition still Speed Thumb videodisc("scan reverse") buttonStillDown buttonStillDown scan reverse videodisc videodisc("play reverse") buttonUp buttonUp play reverse videodisc videodisc(" reverse") goPosition "still" B"Speed Thumb" buttonUp buttonUp step reverse videodisc goPosition still Speed Thumb videodisc("stop") goPosition "still" B"Speed Thumb" buttonUp buttonUp videodisc goPosition still Speed Thumb videodisc(" goPosition "still" B"Speed Thumb" buttonUp buttonUp videodisc goPosition still Speed Thumb videodisc("play") goPosition " B"Speed Thumb" buttonUp buttonUp videodisc goPosition Speed Thumb 3,7\o videodisc("scan buttonStillDown buttonStillDown scan forward videodisc How to odefBounds adjust buttonUp buttonDown buttonUp buttonDown defBounds adjust |?defBounds 3585,435,5730,780 J@"@G@ How To Use This Book field-1 reset --** proportions moved - 15, - 15,\ - 15, -15, reset reset chapter 4s_suspend_ch videodisc("seek chapter", enterfield keydown leavefield keydown seek chapter videodisc s_suspend_ch enterfield s_suspend_ch leavefield s_suspend_ch HEalignment centered field-1 reset --** proportions moved - 15, - 15,\ - 15, -15, reset reset frame 4s_suspend_fr, s_discType "CLV" videodisc("seek frame", enterfield keydown leavefield keydown seek time videodisc seek frame videodisc s_suspend_fr s_discType enterfield s_suspend_fr leavefield s_suspend_fr Jalignment centered 30000 Chapter: Frame or Time 4s_lastRange, s_disctype "CLV" ("Play which range? Example:" \ 0:12:00 0:12:45" & frame 7560 chapter 2" & videodisc(" " && buttonDoubleClick buttonDoubleClick Play which range? Example: from 0:12:00 to 0:12:45 Play which range? Example: from frame 7560 to chapter 2 cancel videodisc s_lastRange s_disctype Frame videodisc(" audio",3) "Speakers" buttonDown buttonDown select audio videodisc Speakers videodisc(" audio",1) "Speakers" buttonDown buttonDown select audio videodisc Speakers videodisc(" audio",2) "Speakers" buttonDown buttonDown select audio videodisc Speakers videodisc(" audio",0) "speakers" buttonDown buttonDown select audio videodisc speakers doHelp odefBounds adjust buttonUp buttonDown buttonUp doHelp buttonDown defBounds adjust SdefBounds 2745,435,3540,780 RT*TOT Help Exit Help exitHelp odefBounds adjust buttonUp buttonDown buttonUp cpexitHelp buttonDown defBounds adjust UdefBounds 2925,4800,3825,5100 Open Door #(#B #(#C #(#D #(#E #(#F #(2G #( H >Z:PHYSSIZE #- I \,\zones 65000,4729,4614,4498,4383,4267,4151,4036,3920,3805,3689,3574,3458,3342,3227,3111,2996 \LastZone \minX 2842.5 \maxX 4807.5 \tBounds 2745,60,4995,345 ]xOffset 6],]Width J]@]y X]track paintobject id 28 of page id 17 #- J #- K t^:PHYSSIZE #- L "a:PHYSSIZE b:PHYSSIZE b:PHYSSIZE nc:PHYSSIZE #- M #- N #- O #3 P #3 Q #3 R #3 S #3 T #3 U #8 W chapter 4s_suspend_ch videodisc("seek chapter", enterfield keydown leavefield keydown seek chapter videodisc s_suspend_ch enterfield s_suspend_ch leavefield s_suspend_ch ialignment centered #8 X frame 4s_suspend_fr videodisc("seek chapter", enterfield keydown leavefield keydown seek chapter videodisc s_suspend_fr enterfield s_suspend_fr leavefield s_suspend_fr 8malignment centered 12345 help Frame or Time #8 Y Frame #8 Z #8 [ #8 \ #8 ] Chapter: Audio Select Channel 1 Stereo Channel 2 Off Current Chapter and Frame numbers. To go to a chapter or frame number directly, simply type it into one of these fields and press Enter. Press Esc to have numbers update automatically again. r Stop Disc Reset Disc Scan Reverse Variable Speed Play for CAV discs only (Drag the thumb or click) Reverse Still Forward Other neat trick: Right-click the mouse to show/hide chapter and frame numbers in the video picture. field-1 reset --** proportions moved - 15, - 15,\ - 15, -15, reset reset phone number dial ( keydown keydown zalignment centered C.0. 6/4/900 Copyright 1990 Asymetrix Corporation Exit Help 4s_inHelp defComPort "Default COM port videodisc control && ". Choose the use." f"COM1" "COM2" "COM3" "123" dummy (Close) (Open) default odefBounds adjust buttonUp buttonDown buttonUp defComPort Default COM port for videodisc control is now COM defComPort . Choose the port to use. defComPort videodisc defComPort videodisc default Close dummy s_inHelp buttonDown defBounds 2925,4800,3825,5100 Set COM Port CLV controls videodisc(" buttonStillDown buttonStillDown pause videodisc CAV callouts Play Reverse Step Reverse Stepl/Step CLV Callouts Pause CLV overlay videodisc("still") buttonStillDown buttonStillDown still videodisc Disc is CLV 6930,5130 videodisc(status player) videodisc("status player") item>") Returns status information about the current state of the player. The returned value can be either: -1 (see videodisc("Open")) Dead (player is off or not connected correctly) Door Open Set Up Disc Unloading Still Pause Search Multi-speed play videodisc(status disc) videodisc("status disc"))s item>") If no disc is currently loaded, returns "No disc" Otherwise, returns a string of 4 items. Item 1: Disk type (CAV or CLV or unknown) Item 2: Disc size (12 inch or 8 inch) Item 3: Disc side (1 or 2 or unknown) Item 4: Whether the disc has chapter codess videodisc(open door) videodisc("open door") Stops the videodisc if it is spinning, and opens the videodisc player door or tray. videodisc(set port ) videodisc(set stop [frame|chapte videodisc("set stop [frame|chapter|time]", ) Sets the stop register to the frame or chapter (for CAV discs) or for the time (CLV discs) specified. If you then send a play command, the playing will stop when the specified address is reached, and the setting will be cleared. If you don't specify chapter, frame or address, frame is assumed for CAV discs, and time is assumed for CLV discs. Note: Depending on the player, different player functions may clear this setting before it is reached. Test carefully. Example get videodisc("set stop frame", 12345) get videodisc("play") -- being naturally lazy, I prefer to use the following for the same effect: get videodisc("play to 12345") videodisc(set background color videodisc("set background color", )lue> Sets the color displayed when the player is paused or stopped with no picture. With Pioneer players, this color is blue by default. must be "black" or "blue" -- the quotes are important. videodisc(set speed for Pioneer players: 240 (4X normal speed) 180 Any value between 1 and 255 is OK 60 (normal speed) 10 (1/6 normal speed) videodisc("set speed", ) videodisc(set key lock videodisc("set key lock",) Locks (disables) or enables the front panel controls of the videodisc player. Usually, only the power switch still works when the lock is in effect. is either 1 for locked, or 0 for unlocked videodisc(still) videodisc("still") Stops on the current frame with a still frame. System xproperly initialized dvaCmd x 4s_DVA_Init s_DVA_Iinit "Error: jx & CRLF -- Initialize default settings, but fno video -- shown (chromakey off). does xrespond, indicate error. initDVA , s_DVA_Key_Color xMICLoaded() "Cannot find drivers." &&\ --"Assuming you are ]separate monitor suspend X"tbkwin.dll" STRING screenFromPage(WORD, , INT, ,sysMagnification,"0,0")\ TBKWIN.DLL xfound wrong ("!EOFF") ("FSTORE MODE 0 COORDS 0,640,480") 1IREGION 0,3,FULL") LDPOS 0,3,0,0, RELATIVE") mWPOS 0,3,0,0") ("TRANSCOLOUR NONE") ("FADE 255,1 /V") BACKGROUND 0,75,75,75") FullScreen 4IsFullScreen ABSOLUTE") DSIZE 0,3, ALL") setVideoOutRect BoundsRect -- Turns on sets which being displayed %specified ToolBook units (relative can specify "pixels" -- Examples: "Foo") ("45,67,3460,4567") ("0,0,640,150 -- If full -- If invalid, turns off 4s_InsetRect, "0,0,639,479 rect ) - 1) pageToScreen( G) < 4 " && "," & ) && " " & \ & "," & \ setKeyColor x -- Sets Ocolor 16 colors palette -- Unfortunately, only 3 )seem work correctly: 5(0), d(15) dark grey (7). Maybe we'll a better trick these days. -- Note: change xtake effect SetVideoOutRect x >= 0 x <= 15 Freeze 4s_DVA_Frozen DVACmd(" INPUT 0,2,DISABLE") unFreeze 2ENABLE") -- Test that Config.sys loaded "mic" testString ) = 1 -- Now "x yx z" & CR "!STATUS" & CR P--- checking part initDVA setVideoOutRect dvaCmd setKeyColor FullScreen Freeze unFreeze MICLoaded dvaCmd Error: DVA not initialized s_DVA_Iinit s_DVA_Init initDVA MICLoaded Error: No DVA drivers tbkwin.dll screenFromPage screenFromPage Error: TBKWIN.DLL not found or wrong TBKWIN.DLL dvaCmd !EOFF dvaCmd FSTORE MODE 0 normal dvaCmd FSTORE COORDS 0,640,480 dvaCmd FSTORE IREGION 0,3,FULL dvaCmd FSTORE DPOS 0,3,0,0, RELATIVE dvaCmd FSTORE WPOS 0,3,0,0 dvaCmd TRANSCOLOUR NONE dvaCmd FADE 255,1 /V dvaCmd FSTORE BACKGROUND 0,75,75,75 suspend s_DVA_Init s_DVA_Key_Color FullScreen FSTORE DPOS 0,3,0,0 ABSOLUTE dvaCmd FSTORE DSIZE 0,3,FULL dvaCmd TRANSCOLOUR ALL dvaCmd IsFullScreen setVideoOutRect Full Screen 0,0,639,479 pixels pixels pageToScreen dvaCmd TRANSCOLOUR NONE dvaCmd TRANSCOLOUR dvaCmd FSTORE DPOS 0,3, ABSOLUTE dvaCmd FSTORE DSIZE 0,3, s_InsetRect s_DVA_Key_Color BoundsRect setKeyColor s_DVA_Key_Color Freeze DVACmd FSTORE INPUT 0,2,DISABLE s_DVA_Frozen unFreeze DVACmd FSTORE INPUT 0,2,ENABLE s_DVA_Frozen MICLoaded !EOFF x yx z !STATUS testString qaB|B| waB|B| defComPort Vdefsize a videodisc player -- The implementation specific Pioneer LD-V2200 LD-V4200. You can use Asame ~ names -- arguments, fdifferent bodies, control other -- boards -- This 8requires TBK-COMM.DLL serial port -- Currently, only be controlled cmd, params 4s_videoDisc_Init, s_videodisc_audio, s_videodisc_status E <> "Open" T <> "Set Port") s_videodisc_Init cmd1 cmd2 whichOne VDOpen( "Initialize" VDCmd("SA") "Close" VDClose( c"Door" c"Tray" AOP") "Set" " -- VDSetPort( "stop" c"ch" CH" & & "SM") FR" & & "SM") "speed" VDSetSpeed( "Display" VDSetDisplay( "key" c"lock" "on" 1KL") 0KL") "Clear" "Play" VDplay( "Still" VDCMD("ST") "Step" c"rev" "Scan" NNR") ZNF") "Seek" "chapter" CH" & & "SE") TM" & & "SE") xsupported here FR" & & "SE") "Select" "Audio" VDSelectAudio( "Status" VDQuery( VDStatus( "reject" audioControl 4s_DVA_Init, s_audio_level < 0 > 255 dvaCmd ("FADE" && v & ",1 /A1/A2") -- assume that tsysbook controller a dangerous assumption, but I can't think -- another way --== General purpose utilities isNumber n suspend n + 0 itemOffset theItem, theList ci <= LinkToSerialDLL --INT clearComBreak(WORD) oseComPort( %flushComRxBuffer( ;flushComTxBuffer( ? isComRxReady( R isComTxReady( wopenComPort( STRING readComPort( setComBreak( setComPort( setComPortTxXlate( _TBK_COMMVersion() writeComPort( "Cannot find N correct version && "Unable access -- Drivers defComPort 8, x & CR) 8) > 0 xlinkToSerialDLL()) s_VideoDisc_Init c"#1" "Sorry, <> "1234" OpenComPort( ,128,128) defComPorts 8,128,128) 8,4800,8,1,0,0) "#1:" & c"3" c"stereo" 3AD") c"1" 1AD") c"2" 2AD") c"off" 0AD") , what, "on" 1DS") 0DS") c"FR" askVDPlayer("F") c"CR" c"Ti" c"Disk" ~("p", ) + 2) ,Park, Unloading, ,Pause,Search, ,Multi- c"type" reader author audioControl LinkToSerialDLL VDCmd videodisc VDOpen VDClose isNumber VDSelectAudio itemOffset VDSetDisplay VDQuery reader sizeToPage author sizeToPage videodisc Set Port s_videodisc_Init VDOpen Initialize VDCmd Close VDClose VDCmd VDSetPort VDCmd VDCmd speed VDSetSpeed Display VDSetDisplay VDCmd VDCmd Clear VDCmd VDplay Still VDCMD VDCMD VDCMD VDCMD VDCMD chapter VDCmd VDCmd VDCmd Select Audio VDSelectAudio Status VDQuery VDStatus reject VDCmd whichOne s_videoDisc_Init s_videodisc_audio s_videodisc_status params audioControl level dvaCmd ,1 /A1/A2 audio s_DVA_Init s_audio_level params isNumber suspend itemOffset theList theItem LinkToSerialDLL TBK-COMM.DLL closeComPort flushComRxBuffer flushComTxBuffer isComRxReady isComTxReady openComPort readComPort setComPort setComPortTxXlate TBK_COMMVersion writeComPort Cannot find the correct version of TBK-COMM.DLL. Unable to get access to the serial ports. suspend VDCmd defComPort readComPort defComPort writeComPort defComPort isComRxReady defComPort readComPort s_videoDisc_Init VDOpen linkToSerialDLL s_VideoDisc_Init Sorry, control for one player at a time only in this version. defComPort OpenComPort defComPorts defComPort defComPort OpenComPort defComPort setComPort defComPort s_VideoDisc_Init s_videoDisc_Init params which VDClose itemOffset s_VideoDisc_Init which VDSelectAudio stereo VDCmd VDCmd right VDCmd VDCmd params which VDSetDisplay VDCmd VDCmd params whichOne VDQuery askVDPlayer askVDPlayer askVDPlayer askVDPlayer Player askVDPlayer Door Open,Park,Set Up,Disc Unloading,Play, Still,Pause,Search,Scan,Multi-Speed Player askVDPlayer which -- C.O. 3/27/90 -- Generic functions a videodisc player -- The implementation specific Pioneer LD-V2200 LD-V4200. You can use Asame ~ names -- arguments, fdifferent bodies, control other -- boards -- This 8requires TBK-COMM.DLL serial port -- Currently, only be controlled cmd, params 4s_videoDisc_Init, s_videodisc_audio, s_videodisc_status E <> "Open" T <> "Set Port") s_videodisc_Init cmd1 cmd2 whichOne VDOpen( "Initialize" VDCmd("SA") "Close" VDClose( c"Door" c"Tray" AOP") "Set" " -- VDSetPort( "stop" c"ch" CH" & & "SM") FR" & & "SM") "speed" VDSetSpeed( "Display" VDSetDisplay( "key" c"lock" "on" 1KL") 0KL") "Clear" "Play" VDplay( "Still" VDCMD("ST") "Step" c"rev" "Scan" NNR") ZNF") "Seek" "chapter" CH" & & "SE") TM" & & "SE") xsupported here FR" & & "SE") "Select" "Audio" VDSelectAudio( "Status" c"fr" VDCurrentFrame( c"ch" VDCurrentChapter( c"ti" VDCurrentTime( c"dis" VDDiskType( VDPlayerType( VDStatus( "reject" audioControl 4s_DVA_Init, s_audio_level < 0 > 255 dvaCmd ("FADE" && v & ",1 /A1/A2") -- assume that tsysbook controller a dangerous assumption, but I can't think -- another way --== General purpose utilities isNumber n suspend n + 0 itemOffset theItem, theList ci <= LinkToSerialDLL --INT clearComBreak(WORD) oseComPort( %flushComRxBuffer( ;flushComTxBuffer( ? isComRxReady( R isComTxReady( wopenComPort( STRING readComPort( setComBreak( setComPort( setComPortTxXlate( _TBK_COMMVersion() writeComPort( "Cannot find correct version ( ." \ && "Unable access 7 s." -- Drivers defComPort 8, x & CR) 8) > 0 xlinkToSerialDLL()) s_VideoDisc_Init c"#1" N > 1 "Sorry, "1234" OpenComPort( ,128,128) defComPorts 8,128,128) 8,4800,8,1,0,0) "#1:" & c"3" c"stereo" 3AD") c"1" 1AD") c"2" 2AD") c"off" 0AD") , what, "on" 1DS") 0DS") reader author emOffset audioControl LinkToSerialDLL VDCmd videodisc VDOpen VDClose isNumber VDSelectAudio itemOffset VDSetDisplay reader sizeToPage author sizeToPage videodisc Set Port s_videodisc_Init VDOpen Initialize VDCmd Close VDClose VDCmd VDSetPort VDCmd VDCmd speed VDSetSpeed Display VDSetDisplay VDCmd VDCmd Clear VDCmd VDplay Still VDCMD VDCMD VDCMD VDCMD VDCMD chapter VDCmd VDCmd VDCmd Select Audio VDSelectAudio Status VDCurrentFrame VDCurrentChapter VDCurrentTime VDDiskType player VDPlayerType VDStatus reject VDCmd whichOne s_videoDisc_Init s_videodisc_audio s_videodisc_status params audioControl level dvaCmd ,1 /A1/A2 audio s_DVA_Init s_audio_level params isNumber suspend itemOffset theList theItem LinkToSerialDLL TBK-COMM.DLL closeComPort flushComRxBuffer flushComTxBuffer isComRxReady isComTxReady openComPort readComPort setComPort setComPortTxXlate TBK_COMMVersion writeComPort Cannot find the correct version of TBK-COMM.DLL. Unable to get access to the serial ports. suspend VDCmd defComPort readComPort defComPort writeComPort defComPort isComRxReady defComPort readComPort s_videoDisc_Init VDOpen linkToSerialDLL s_VideoDisc_Init Sorry, control for one player at a time only in this version. defComPort OpenComPort defComPorts defComPort defComPort OpenComPort defComPort setComPort defComPort s_VideoDisc_Init s_videoDisc_Init params which VDClose itemOffset s_VideoDisc_Init which VDSelectAudio stereo VDCmd VDCmd right VDCmd VDCmd params which VDSetDisplay VDCmd VDCmd params whichOne setKeyColor s_DVA_Key_Color Freeze DVACmd FSTORE INPUT 0,2,DISABLE s_Frozen unFreeze DVACmd FSTORE INPUT 0,2,ENABLE s_Frozen DVAZoom dvaCmd FSTORE IREGION 0,2, dvaCmd FSTORE IREGION 0,3,FULL s_video_zoomed s_inRect ZoomRect MICLoaded !EOFF x yx z FxADE 0,1,3,5 /V;!STATUS testString YaB|B| 6930,5130 -- C.O. 3/27/90 -- Generic functions a videodisc player -- The implementation specific Pioneer LD-V2200 LD-V4200. You can use Asame ~ names -- arguments, fdifferent bodies, control other -- boards -- This 8requires TBK-COMM.DLL serial port -- Currently, only be controlled cmd, params 4s_videoDisc_Init, s_videodisc_audio, s_videodisc_status E <> "Open" T <> "Set Port") s_videodisc_Init cmd1 cmd2 whichOne VDOpen( VDCmd("SA") "Close" VDClose( c"Door" c"Tray" AOP") "Set" " -- VDSetPort( "stop" c"ch" CH" & & "SM") FR" & & "SM") "speed" & "SP") "Display" VDSetDisplay( "key" c"lock" "on" 1KL") 0KL") c"color" 16RC") 0RC") "Clear" "Play" VDplay( "Still" VDCMD("ST") "Pause" "Step" c"rev" "Scan" eNR") qNF") "Seek" "chapter" CH" & & "SE") TM" & & "SE") xsupported here FR" & & "SE") "Select" "Audio" VDSelectAudio( "Status" VDQuery( VDStatus( "reject" --== General purpose utilities isNumber n suspend n + 0 itemOffset theItem, theList ci <= wordoffset theWord, theStr ci <= LinkToSerialDLL --INT clearComBreak(WORD) oseComPort( %flushComRxBuffer( ;flushComTxBuffer( ? isComRxReady( R isComTxReady( wopenComPort( STRING readComPort( setComBreak( setComPort( setComPortTxXlate( _TBK_COMMVersion() writeComPort( "Cannot find correct version && "Unable access -- Drivers defComPort 8, x & CR) 8) > 0 xlinkToSerialDLL()) s_VideoDisc_Init c"#1" "Sorry, <> "1234" OpenComPort( c ,128,128) defComPorts 8,128,128) 8,4800,8,1,0,0) "#1:" & CloseComPort( c"3" c"stereo" 6 3AD") c"1" Y 1AD") c"2" | 2AD") c"off" 0AD") , what, "on" 1DS") 0DS") c"FR" askVDPlayer("F") c"CH" c"Ti" c"Disk" loaded" codes" "Has "unknown" "Side 1" "12 inch" "CAV" "CLV" c"type" "P1506" 8000 (" & & ")" "P1507" (" & & ")" ~("p", ) + 2) ,Park, Unloading, ,Search, ,Multi-Speed" c"KeyData" p, "?" & & CR) p) = 0 p) > 0 wordOffset(" ", cmd) + 1) s <> "CH" & P") < 4 -- xready s & "SE") < 0 marker + 1) s <> "CH" & s & "SM") < 0 & "SPMR") & "SPMF") author reader enterbook nkToSerialDLL videodisc VDCmd VDOpen itemOffset VDClose VDSelectAudio wordoffset VDSetDisplay VDQuery isNumber askVDPlayer LinkToSerialDLL VDPlay reader sizeToPage author sizeToPage enterbook reader videodisc Set Port s_videodisc_Init VDOpen VDCmd Close VDClose VDCmd VDSetPort VDCmd VDCmd speed VDCmd Display VDSetDisplay VDCmd VDCmd color black VDCmd VDCmd Clear VDCmd VDplay Still VDCMD Pause VDCmd VDCMD VDCMD VDCMD VDCMD chapter VDCmd VDCmd VDCmd Select Audio VDSelectAudio Status VDQuery VDStatus reject VDCmd whichOne s_videoDisc_Init s_videodisc_audio s_videodisc_status params isNumber suspend itemOffset theList theItem wordoffset theStr theWord LinkToSerialDLL TBK-COMM.DLL closeComPort flushComRxBuffer flushComTxBuffer isComRxReady isComTxReady openComPort readComPort setComPort setComPortTxXlate TBK_COMMVersion writeComPort Cannot find the correct version of TBK-COMM.DLL. Unable to get access to the serial ports. suspend VDCmd defComPort readComPort defComPort writeComPort defComPort isComRxReady defComPort readComPort s_videoDisc_Init VDOpen linkToSerialDLL s_VideoDisc_Init Sorry, control for one player at a time only in this version. defComPort OpenComPort defComPorts defComPort defComPort OpenComPort defComPort setComPort defComPort s_VideoDisc_Init s_videoDisc_Init params which VDClose defComPort CloseComPort s_VideoDisc_Init which VDSelectAudio stereo VDCmd VDCmd right VDCmd VDCmd params which VDSetDisplay VDCmd VDCmd params whichOne VDQuery askVDPlayer askVDPlayer askVDPlayer askVDPlayer No disc loaded No chapter codes Has chapter codes unknown Side 1 Side 2 unknown 12 inch 8 inch unknown unknown Player askVDPlayer P1506 Pioneer LD-V8000 ( P1507 Pioneer LD-V2200 ( Player askVDPlayer isNumber Door Open,Park,Set Up,Disc Unloading,Play, Still,Pause,Search,Scan,Multi-Speed KeyData askVDPlayer which askVDPlayer defComPort writeComPort isComRxReady isComRxReady readComPort VDPlay wordOffset chapter VDCmd wordOffset chapter VDCmd VDCmd VDCmd 60SPMR VDCmd VDCmd params waB|B| decComPort -- C.O. 5/17/90 -- Housekeeping code 8only 4s_author 4s_videodisc_open ("close") trim s -- lop off whitespace U(s) > 0 s) <= 32 U(s) > 0 s) <= 32 filterCtrl s -- T< " " ) >= 32 legalName s, maxL -- , s) > 0 ,s)) ~(",",s) p > 0 suspend X"TBKWIN.DLL" INT popMenu(WORD, STRING, "titles" /"reference" C(mL) mL) & CRLF lc > 20 (lc / 2) Bi-1 Y) <> "|" "|" & , sysMagnification,\ -- The implementation the functions specific Pioneer LD-V2200 LD-V4200. You can use Isame L names -- arguments, fdifferent r bodies, control other -- boards -- This 8requires TBK-COMM.DLL serial port -- Currently, player be controlled cmd, params 4s_videoDisc_Init, s_videodisc_audio, s_videodisc_status, s_disctype Q <> "Open" ` <> "Set Port") s_videodisc_Init cmd1 cmd2 whichOne s_discType VDOpen( c"Reset" askVDPlayer("SA",60) VDQuery(1," "Close" VDClose( (cmd c"Door" c"Tray") |OP",25) CO",25) "Set" " -- VDSetPort( "stop" c"ch" CH" & pad( ) & "SM", 2) "clv" TM" & stripTime( ) & "SM") FR" & ,5) & "SM") "speed" VDCmd( & "SP") "Display" VDSetDisplay( "key" c"lock" "on" r"1KL") "0KL") c"color" "16RC") "0RC") "Clear" "CL") VDplay( "Still" VDCMD("ST") "Pause" "PA") "Step" c"rev" "Scan" fNR") rNF") "Seek" "chapter" "CH" & & "SE") "TM" & ) & "SE") "FR" & & "SE") "Select" "Audio" VDSelectAudio( "Status" VDStatus( "reject" RJ",20) isNumber( RJ",20) --== General purpose utilities n + 0 itemOffset theItem, theList ci <= wordoffset theWord, theStr ci <= LinkToSerialDLL clearComBreak( closeComPort( flushComRxBuffer( flushComTxBuffer( isComRxReady( isComTxReady( openComPort( readComPort( setComPort( setComPortTxXlate( TBK_COMMVersion() writeComPort( "Cannot find correct version 5 ." \ && "Unable access D s." -- Drivers defComPort 8, x & CR) 8) > 0 xlinkToSerialDLL()) s_VideoDisc_Init c"#1" < > 1 "Sorry, cN <> "1234" ("Use COM (1, 2, 3 4?)" "Cancel" "1234" defComport cidID OpenComPort(cN,128,128) " & cN xavailable. " busy. " p1 & "Try another one?" \ f"COM2" "COM3" p1 & " vCOM1?" f"Yes" cN > 2 p1 & " baud ,8,1,0,0) X",1) Y,8,1,0,0) X",1) X",1) on COM"\ 8&& " wrong setup."\ && "Check that turned on connections are"\ Again" anything "#1:" & CloseComPort( c"3" c"stereo" "3AD") c"1" "1AD") c"2" "2AD") c"off" "0AD") , what, "on" "1DS") "0DS") c"FR" c"E0" "N/A" c"CH" c"E0" "N/A" c"TI" c"E0" "N/A" & ":" & & ":" & c"Disk" loaded" codes" "Has "unknown" "Side 1" "12 inch" "CAV" "CLV" r -- " "P1506" 8000 (" & & ")" "P1507" (" & & ")" "No response" "Dead" ~("p", ) + 2) ,Park, Unloading, ,Search, ,Multi-Speed" c"KeyData" maxpause "?" & & CR) systf maxPause <> maxT cursor crsr p) = 0 - st > - st > 2 F> 36 p) > 0 h, r) > 0 h, r) xready -- initialize wordOffset(" ", cmd) + 1) s <> "TM" & "FR" & s + 2) "CH" & "frame" "FR" & "TM" & "No Response" s & "SE",10) <> "R" marker + 1) s <> "TM" & "FR" & "CH" & "FR" & s & "SM") <> "R" & "SPMR") & "SPMF") "PL") vdSetPort n n < 1 n > 4 currentP 1, n) pad s, n U(s) < n t -- cp > 0 p = 0 rp > 3 enterbook author leavebook reader rightButtonDoubleClick alName LinkToSerialDLL VDCmd videodisc VDOpen filterCtrl VDClose VDSelectAudio isNumber VDSetDisplay VDQuery itemOffset askVDPlayer VDPlay wordoffset vdSetPort legalName stripTime reader sizeToPage author sizeToPage s_author enterbook close videodisc reader s_videodisc_open leavebook filterCtrl legalName filterCtrl rightButtonDoubleClick TBKWIN.DLL popMenu titles reference popMenu legalName title suspend videodisc Set Port s_videodisc_Init s_discType s_videodisc_Init VDOpen Reset askVDPlayer VDQuery Close VDClose askVDPlayer close askVDPlayer VDSetPort askVDPlayer s_discType stripTime askVDPlayer askVDPlayer speed VDCmd Display VDSetDisplay VDCmd VDCmd color black VDCmd VDCmd Clear VDCmd VDplay Still VDCMD Pause VDCmd VDCMD VDCMD VDCMD VDCMD chapter VDCmd stripTime VDCmd VDCmd Select Audio VDSelectAudio Status VDQuery VDStatus reject askVDPlayer askVDPlayer isNumber askVDPlayer whichOne s_videoDisc_Init s_videodisc_audio s_videodisc_status s_disctype params isNumber suspend itemOffset theList theItem wordoffset theStr theWord LinkToSerialDLL TBK-COMM.DLL closeComPort flushComRxBuffer flushComTxBuffer isComRxReady isComTxReady openComPort readComPort setComPort setComPortTxXlate TBK_COMMVersion writeComPort Cannot find the correct version of TBK-COMM.DLL. Unable to get access to the serial ports. suspend VDCmd defComPort readComPort defComPort writeComPort defComPort isComRxReady defComPort readComPort s_videoDisc_Init VDOpen linkToSerialDLL s_VideoDisc_Init Sorry, control for one player at a time only in this version. defComPort defComPort Use which COM port (1, 2, 3 or 4?) Cancel defComPort defComport OpenComPort Serial port COM is not available. is busy. Try another one? Cancel defComPort defComPort Try COM1? defComport Try another port? Cancel defComPort defComPort defComPort setComPort askVDPlayer defComPort setComPort askVDPlayer askVDPlayer No videodisc player on COM defComPort or wrong player setup. Check that the player is turned on and connections are correct. Try Again Cancel Cancel defComPort closeComPort defComPort s_VideoDisc_Init Cancel anything player cidID s_videoDisc_Init params which VDClose defComPort CloseComPort s_VideoDisc_Init which VDSelectAudio stereo VDCmd VDCmd right VDCmd VDCmd params which VDSetDisplay VDCmd VDCmd params whichOne VDQuery askVDPlayer askVDPlayer askVDPlayer isNumber askVDPlayer No disc loaded No chapter codes Has chapter codes unknown Side 1 Side 2 unknown 12 inch 8 inch unknown unknown Player askVDPlayer P1506 Pioneer LD-V8000 ( P1507 Pioneer LD-V2200 ( Player askVDPlayer No response isNumber Door Open,Park,Set Up,Disc Unloading,Play, Still,Pause,Search,Scan,Multi-Speed KeyData askVDPlayer s_disctype which askVDPlayer defComPort writeComPort seconds maxPause maxPause isComRxReady No response isComRxReady readComPort cursor systf maxpause VDPlay VDQuery askVDPlayer isNumber askVDPlayer wordOffset stripTime isNumber chapter frame stripTime No Response askVDPlayer wordOffset stripTime isNumber chapter frame askVDPlayer VDCmd VDCmd 60SPMR VDCmd VDCmd s_discType params vdSetPort isNumber defComPort VDClose VDOpen VDOpen currentP s_videodisc_Init stripTime 00000 rightbuttonDown 4s_display_fr videodisc(" status chapter") I",0) uttonDown rightbuttonDown leavebackground rightbuttonDown set display videodisc status chapter videodisc set display videodisc status chapter videodisc s_display_fr leavebackground s_display_fr videodisc(status frame) ideodisc videodisc("status frame") videodisc("status chapter")) Returns the current frame or chapter number for CAV discs. reference The videodisc function controls the videodisc player through the serial port. You can use any of the serial ports available on the machine (COM1 through COM4). To select the serial port, set the user-defined property defComPort of the current book to the number of the current port: 1 for COM1, 2 for COM2, etc. Windows is very fussy about serial ports. If any problem occurs while a port is in use or if a port was not closed properly before leaving Windows, you may have to cold-boot your machine in order for the port to work again. To avoid problems, be sure to faithfully call videodisc("open") and videodisc("close") at the beginning and end of a session. Also call videodisc("set port", x) to change ports safely. TBK-COMM.DLL can service several ports with different settings at the same time. The ports not used by videodisc are still available for other uses. The reference section begins on the next page..e reference section begins on the next page. Serial Port Control reference disable "Next" enable adjust x --** -- reset proportions moved objs -15, -15, -15,\ -15, -15, -15, - 15,\ defBounds setCaption what 0,50.1875,0 trim( "title") legalname( , 60) "titles" default djust setCaption disable enterpage enable adjust saveas enterpage ox%disable enable adjust defBounds setCaption disable enable 0,0,0 saveas title title legalname titles default , T title odefBounds adjust buttonUp buttonDown buttonUp buttonDown defBounds adjust defBounds 5670,4680,6885,5085 Go Back odefBounds adjust buttonUp buttonDown buttonUp buttonDown defBounds adjust defBounds 15,4650,1380,5085 Demo Previous odefBounds adjust buttonUp buttonDown buttonUp previous buttonDown defBounds adjust defBounds 3090,4680,4305,5085 Previous odefBounds adjust buttonUp buttonDown buttonUp buttonDown defBounds adjust defBounds 4410,4680,5580,5085 Next Reference titles videodisc(close) videodisc(initialize) videodisc(open door) videodisc(open) videodisc(pause) videodisc(play [from ] [to ] [reverse] videodisc(reject) videodisc(scan)videodisc(scan reverse) videodisc(seek [frame|time|chapter] videodisc(select audio videodisc(set background color videodisc(set key lock videodisc(set port videodisc(set speed videodisc(set stop [frame|chapter|time] videodisc(status ) videodisc(status disc) videodisc(status frame) videodisc(status time) videodisc(status keydata) videodisc(status player) videodisc(status playerType) videodisc(step) videodisc(still) videodisc(stop) 7 of page id 29 recordfield id 7 of page id 28 recordfield id 7 of page id 30 videodisc("Step") videodisc("Step reverse") videodisc("still") videodisc("stop") videodisc("reject") videodisc(open) You must call videodisc with the "Open" command before any other calls to the function. The function will return -1 if the initialization failed. After calling this function, the serial port to communicate with the videodisc player is open. More than one instance can use this port to talk to the player via TBK-COMM.DLL, but this requires extreme care. You can check easily that the videodisc driver is open: If you call the function videodisc with any parameter other than "open" or "close" and you get an error, it is not open. videodisc("open") videodisc(close) videodisc("close") Call video with this command when you end the session, to be sure that the serial port you were using is released and things are left tidy. See also videodisc("Open"). Example: to handle leaveBook system s_videodisc_OK if s_videodisc_OK get videodisc("stop") get videodisc("close") end if videodisc(initialize) ideodisc(r These two commands have the same effect. If the videodisc is in any play mode, playing stops. The player spins the videodisc and seeks frame 00001. When that frame is found, the player remains in still mode. Example: get videodisc("reset") -- gets the disc ready to play from frame 1 videodisc("initialize") videodisc("reset") videodisc(scan)videodisc(scan re Scans the videodisc from the current position, skipping about 400 frames each time it is called. Example to handle buttonStillDown get videodisc("scan") endkey color), the effect of this function call remains invisible until you set the chroma key color or you call video ("set inset", ). The system variable s_video_level is set to the current video level. video("fade in") sets it to 255 , and video("fade out") sets it to 0 . is in hundredths of a second. If is not specified, the fade will take one second. Note: Control returns to your application as soon as the fade is initiated, not when it is complete. videodisc("scan") videodisc("scan reverse"),])]))>]) videodisc(close) c(initialize) videodisc videodisc(pause) videodisc(status ) Returns information about the status of the player. See the various pages that follow for information on specific items.a rectangle in ToolBook units Example: get video("set inset", bounds of rectangle "inset reference") You can also specify a rectangle in pixels relative to the screen. Simply add the word "pixels" at the end of the rectangle string. Example: get video("set inset","10,0,450,340 pixels") can also be one of the following values: full screen -- the video will take over the full screen, regardless of chroma key color setting none -- the video inset is removed and chroma key is turned off videodisc("status ")rectangle>) videodisc(open door) videodisc(Seek [frame|time|chapt videodisc(seek [frame|time|chapt videodisc("seek [frame|time|chapter]", ) reeze") Positions the player to the specified frame, time or chapter, and leaves it in still mode. The second word after seek is optional. If omitted, frame is assumed. Seek time is not implemented on all players, and works only on CLV discs when implemented. Examples: get videodisc("Seek", 8907) -- goes to frame 8907 get videodisc("Seek chapter", 3) -- goes to first frame of chapter 3 get videodisc("Seek frame", 8907) -- goes to frame 8907 ,b(;@ ,$6,b^aR