VIDI ROMBO Productions VIDI VIDEO DIGITISER INTRODUCTION VIDI is a video -frame grabber/digitiser specifically designed for use with the Amstrad CPC range of computers. With this package, it is possible to capture a picture from any standard video source, camera, video recorder, even other computers. You may then save this picture on disc or tape, produce dynamic effects, manipulate the picture or re_display it on your CPC computer screen. Pictures can be grabbed in MODE 2 (hi-resolution, 2 shades), MODE 1 (med-resolution, 4 shades) or a special 16 shade MODE O synthesised picture. VIDI contains its own CRT controller and 16k of video RAM enabling it to capture a moving picture at over 6 frames per second. A ribbon cable with dual expansion connectors connects VIDI to the computer. A suitable video lead is also supplied, fitted with RCA (phono) and BNC (video) connectors. Software is provided in two forms, an interactive control program and BASIC extensions (RSX's) for simple control of the sophisticated VIDI hardware. CONNECTING UP 1. Ensure that the computer is switched OFF. 2. Attach the end of the VIDI ribbon cable to the expansion port of the computer. See Fig.l, or Fig.2 and Fig.3 opposite. Care should be taken not - to connect the ribbon cable upside down. Vidi must be connected-so that the ribbon cable is at the bottom and the duplicate edge connector is at the top. 3. Connect the phono end of the video cable to the socket on VIDI and the BNC video plug to the VIDEO OUT* socket on your video recorder or camera. 4. If your VIDI software is on ROM then insert this into a free socket in your ROM box as detailed in its instructions. 5. Switch on your video equipment. 6. Switch on your computer and if fitted, the VIDI ROM will announce Itself. If not insert the Disc or Tape supplied with the package and Type :- RUN "VIDI for Disc/Cassette users or |VIDI for ROM users. < | is obtained by using SHIFT and @ ) 7. You should now be watching Digitised pictures on your computer screen! - if not read the 'Trouble Shooting' section. THE SOFWTARE TAPE: Side A of the cassette supplied contains the main VIDI command obtained by typing RUN"VIDI". This is an interactive program allowing complete yet simple control of the VIDI hardware. Side B of the cassette contains the seperate commands to allow you to develop your own BASIC software using the advanced features of the VIDI hardware. DISC: The same two main parts of the VIDI software are on disc and by Typing :- RUN "DISC, you will be given the following menu: 1.. Interactive VIDI command 2.. Other RSX commands To select the correct option, you should press the relevant key, 1 or 2. Alternatively, instead of RUN"DISC type RUN"VIDI for the interactive program or RUN"RSX for the seperate RSX commands. ROM: The ROM software offers all the functions of the |VIDI command and the RSXs without having to load in' these parts individually. You will find that using the ROM is much more convenient than cassette or disc and frees more memory for your own programs (see appendix A for upgrade details). Using the |VIDI command The software supplied with your VIDI video digitiser is contained in RSX form. The most comprehensive of these RSX commands is IVIDI and this is the one we shall start with. At the bottom of your screen there is a MENU, this features a line of commands, one of which is highlighted (the GRAB option to start with) by a white bar, or cursor. To move this bar, we can use the left and right arrow keys on the keyboard or joystick. If you move the cursor left or right you will see it select in turn each option. At the edge of the screen it will 'wrap around* and appear at the other edge. When an option has been selected, the option values may be changed by pressing the up and down keys on the keyboard or joystick. 1. The Brightness control Move the Menu bar to the 'BRGT-07' option. This is the software brightness control and its range is from O to IS. As this value is increased or decreased the picture will become brighter or darker accordingly, with 15 being the brightest. 2. The Contrast control The contrast control, 'CONT' is operated in much the same way as the brightness. Increasing the contrast will give a bolder, more defined picture consisting of less intermediate shades. Similarly, lowering the contrast results in an increase in intermediate shades and a less defined picture, just as the contrast on a normal TV. 3. The picture position controls A normal TV picture is slightly too large to be displayed on tlio computer screen, instead we look through a window' onto this larger area. The picture position controls allow us to scroll this window over the TV picture. It is possible to adjust the horizontal and vertical positions of the grabbed picture by changing the values next to the up-down and left-right arrows. Moving the Menu Bar to the left-right option and increasing or decreasing its value, will cause the picture to move slowly across the screen (between 0 and 31 on the control). The control for the vertical movement is operated in a similar way. However, beacuse the vertical position control has such a wide range of values (0-127), when the up or down key is kept pressed, the number will at first change in steps of one and then in jumps of four for ease and speed of use. 4. Clearing, selecting, X option and the ESC key. All control options may be reset to their default values by using the CLR or DEL keys on the keyboard (the FIRE button on the joystick will also perform this action). Many options on the menus do not have values assigned to them, these options are associated with performing a function or moving to another menu. To use these other options, you can press any of COPY, SPACE, RETURN, ENTER or FIRE. The 'X' option is present in all menus. Its function is to return you to the last menu or, in the case of the main menu, to BASIC. Upon selecting the X option from the main menu, the computer will check that you really want to exit the program. Answer by pressing 'Y' or FIRE for YES and 'N' or any joystick direction for NO. For convenience, the 'X' key on the keyboard (X for exit!) or the 'ESC may be used to exit. When returning to BASIC using the 'X' option, information such as inks, mode etc. is restored to the state set before entering the VIDI program. IThis only applies to the ROM ver sion. ) 5. The GRAB menu, X on this menu nill return you to the MAIN menu. Once you have decided that you are happy with the digitised picture, select GRAB and a new menu will appear. Notice that the picture has been 'frozen' - you have now selected that picture and can now do something with it. SAVE is used to save the picture to disc or tape. DUMP will print out a copy of the picture to an Epson compatible printer using print routines unique to VIDI. FILE PRINT and controL are documented later. SWAP will allow you to swap between the picture you selected and the previous frame - just in case you just missed it!. 6. The FILE menu, X will exit to the CRAB menu. SAVE does the same as the save option in the GRAB menu, it is repeated here for convenience. Filenames must be entered when saving, loading or deleting. When these options are selected, a prompt and a suggested name will appear. Using left and right keys, you can position the cursor in the filename and alter it as required. The method of inputting is very similar to the BASIC line editor. Left and right move the cursor (note that the cursor can also move over the X option, returning you to the GRAB menu) and CONTROL-left and CONTROL-right move to the start and end of the filename. DEL may be used to erase characters in the normal way and RETURN, ENTER or FIRE can be used to indicate that you are happy with the filename. A '?' may be used as a wildcard within the filename when DELETE is used. When editing disc filenames, you can also edit the file extension by typing a dot. This will clear upto the existing extension and allow you to type in a new one. LOAD option allows you to load a file to the screen. If ART option is active a PALette file will also be loaded. DELETE allows you to delete unwanted files. CAT will display a catalogue of the disc or tape. WARNING: using CAT will wipe out the other picture which can be obtained by using SWAP. In 1 screen mode (see ConTRoL menu) the picture will be lost entirely and cannot be regained. You have been warned... BIN is used to change the type of file used. BIN is the normal screen only format (disc users are permitted to alter the file extension). The other option ART saves two seperate files. One is the palette file (with the extension '.PAL') containing the screen mode and colours, folowed by the screen file (with the extension '.SCR') which is the normal screen file. This option is very useful for use in conjunction with 'The Art Studio' from Rainbird as the palette and screen files are fully compatible, (note: ART is invalid in Mode 0) DRV The final entry on the FILE menu is the storage medium. On a cassette only machine it will be permanently fixed at TAPE but on a &&4/612B, it will default to DRV-A and can be changed to use Drive B or Tape. 7. The PRINT menu, X returns to the GRAB menu. DUMP is the same as dump on the GRAB menu. Whilst printing, you may press CLR w DEL to terminate the printing. ESC may be used in emergencies, but due to the way that grapnic printing works, could lock the printer ON LINE and you may need to turn it off and on again to reset it. HORZ allows you to suloct the print direction. H0RZ will print the screen across the paper, with enough room to print two screens on one sheet. VERT prints the picture sideways on the paper producing a larger image taking up a whole sheet. 1-STRIKE refers to single print density while 2-STRIKE will print using double density. A double density dump will produce a bolder image, but take approximately twice as long to print. CR+LF Will select between CR ONLY and CR ? LF. If it is found that there is a gap between every line printed, the last option on this menu should be changed to CR ONLY instead of CR+LF, this is to allow for printers that print an automatic line feed every time a carriage return is received. 8. The ConTRoL Menu, X nill return you to the GRAB menu. INK option sets the colour assigned to a particular ink. The first number is the ink number, the second is the colour number. The up or down cursor will change the number that is highlighted. The ink numbers cycle from 0 to 15 in Mode 0, 0 to 3 in Mode 1 and 0 to 1 in Mode-2 (different sets of colours are held for each mode) at the end of each cycle there is also a feature to change the border colour. If DEL or CLR is pressed when the cursor is ov®r the colour, that colour will be reset to its default value. If the same is done over the ink number then all the colours for that mode are reset. Note that in Mode 1 inks are in the order O, 1, 3, 2 with respect to brightness levels due to the hardware design. 2-SCR allows you to change the screen update method. In 2-SCR mode, VIDI uses a technique of grabbing the picture to memory before displaying it. The 1-SCR option will change this to make use of only a single screen giving a 'rippling* effect when grabbing a moving picture, but using less memory. MODE allows you to alternate between different screen resolutions. The screen mode may be changed to accommodate Mode 2 (not to be confused with the 2-SCR option!.). This mode has a higher resolution but only two colours. When changing the screen mode, a picture may be displayed in the wrong mode (which can give strange effects). When you return to the MAIN menu, pictures will be grabbed correctly in the mode that you have set. In Mode 0 the screen uill be updated in Node 1 until the picture is grabbed, when it uill change to Hode 0. tlode 0 is synthesised by integrating 16 successive frames. This necessitates a still video source (usually a video earner a). VW removes the Menu line and view the entire screen. This is in case the bottom of the picture is incorrect. When changing the vertical positioning, the end of the grabbed frame may be visible as a black bar. When VW is selected, the menu will vanish until you press any key, when it will return. NOTE: Pressing "V" on the MAIN menu Hill produce the same result. RESET returns all parameters to their original values. - except the 1 or 2 screen flip mode. We have now covered all of the functions contained in the interactive VIDI software. If you have had difficulty in understanding any of the functions, read over the appropriate section again and experiment with the software itself. THE RSX COMMANDS As was previously mentioned, the software supplied can also operate using RSX 'bar' commands from BASIC. However, to write programs incorporating VIDI, you will need to have some knowledge of the BASIC programming language of the CPC computers. If you are unsure on programming techniques, see the example programs on the System disc supplied and consult your Amstrad User Guides. All the other external commands can be called directly or from a BASIC program. Most of the commands have parameters after them separated by commas, although default parameters are assumed if they are missing. When using BASIC 1.0 on the 464, it is necessary to pass string variables to these routines by using a command such as: A$="FRED":|VIEW,@A$ whilst, if using BASIC 1.1, you may just type; |VIEW,"FRED" Commands are listed with their names and entry conditions. Default parameters are also listed. So, missing out a parameter in brackets will use that default value. Parameters called 'scr* refer to the screens at &4000 or &C000. A parameter of 0 represents the screen at &C000 and 1 uses the screen at &4000. If a 6128 is used, or an add-on 64k RamPack then frames can be grabbed or moved to the banked ram, with these blocks being addressed as screens 2-5. The default for this value is always ttie current screen. The commands are as follows s_ |VBANK,scr For 12Bk CPC's. It allows selection of banks 2-5 into the memory location of bank 1 <8<4000> . All commands (e.g. VGRAB) which write to the current screen will update the selected Bank if VS,EE is set to scr 1. N.B. The CPC hardware will continue to display the original screen (1) if it is selected as the viewing screen for example by VSEE,1. However the Firmware will write to the new Bank. The viewed screen, therefore, remains unchanged. |VBORDER,n Sets the Border colour to n (0 - 26). |VIDI(,s) Enter the interactive program. Parameter S ************ should be 1 or 2 to set 1-SCR or 2-SCR modes. * RON ONLY * Unless using ROM, this command is seperate from ************ all the others due to space limitations. |VBRI(,n) Sets the brightness to n. Default=7. |VCLEAR(,l,r,t,b)(,scr> Clears window (left,right,top,bottom) on specified screen to current |VPAPER ink. Default is current |VWINDOW coordinates and current screen. If only one parameter is present it is assumed to be 'scr'. See section on WINDOWS for details of specifying coordinates. |VC0N(,n) Sets the contrast to n. Default=7 |VCONVERT(,scr) Swaps inks 2 and 3 on screen (works in mode 1 only). This is useful when dealing with other printer or graphics routines that need the ink brightness to be in the order 0,1,2,3 instead of 0,1,3,2 (the built-in print routine will cope with either). |VCOPY (,sscr (,dscr)) Copies a screen from source scr, to destination scr. If only one parameter is present it is assumed to be the source with the current screen as destination. |VDUMP(,p) Dumps current screen to EPSON compatible printer using 27 possible shades for displayed colours. The parameter is bit significant: Bit=0 (off) | Bit=1 (on) ------------------------+------------------------ Bit 0 = CR + LF | CR ONLY (add 1) Bit 1 = Normal Density | Double Density (add 2) Bit 2 = Horizontal | Vertical (add 4) If you are unsure of Binary arithmetic, to select the functions you want on the right of the table just add together the number listed by them. e.g. |VDUMP,6 would print a vertical double density screen giving carriage returns and line feeds. Default=last setting. |VGET(,scr> Grab a frame to a screen without doing any setting up. VGET is slightly faster that VGRAD. |VGRAB( ,scr) Grabs a -frame to a screen, setting up colours, made, screen offset (in case screen has been scrolled) etc. Note that values for colour and mode are held seperate from the normal BASIC values. (See |VMODE |VINK etc.) |VIEW,filename Takes a string parameter and loads and displays a palette and screen file. Compatible with Rainbird's 'Art Studio'. Only specify the name part when using disc _ not drive, user or extension. |VINK(,i(,c)) Sets ink 'i' to colour 'c' for current VMODE. If 'c' is missed out, colour will default to its normal setting and if no parameters are specified, all inks for that mode will be reset. |VMODE(,m) Sets current grab mode to mode 'm'. Default=1. |VPAGE(,m(,scr)) Converts screen into a form suitable for AMX PageMaker program. PageMaker has the -facility for loading in Mode 0 or Mode 1 screens and converting them to its normal Mode 2. However, the inks must be in a specific order of brightness, SVPAGE will perform this conversion for normal VIDI screens. The screen should be saved after |VPAGE by using the BASIC save command -e.g. 10 LOAD "VIDISCR4.BIN",&C000 20 |VPAGE,1,0 ;REM mode 1,screen 0 30 SAVE "PAGESCR4",b,&C000,&4000 Default _ current mode and screen. If only one parameter is present it is assumed to be 'scr' |VPAPER(,i) Sets background paper ink for |VCLEAR. Default=0. |VREAD(,x,y) Reads data from currently defined scan window (see SVSCAN) and displays it at screen position x,y. (see the WINDOWS section further on for details of the x,y coordinate system). The whole scan window is forced to lie within the screen boundary. Default=original scan window position. If VMODE=0 then no action is taken. |VRESET Resets all RSX parameters to their default values. |VSCAN Scans a frame into VIDI ram, without displaying it, used in conjunction with iVREAD for grabbing and displaying windows (see the |VWINDOWS section). |VSEE,scr Reset screen offset (if scrolled) and view screen 0 or 1. Useful for flipping between screens after grabbing. NOTE: If screen 1 (&4000) is used care must be taken not to overnrite any program or data that is residing there _ possibly causing the computer to 'crash'. This can be avoided by setting HIMEM to &3FFF (MEMORY &3FFF) before using the RSX's. |VSET Set up VIDI values in preparation for grabbing. Note: |VSETKVGET is equivalent to '.VGRAB. |VSMALL,x,y This command has the same restrictions as |VREAD, see manual. It will scan a complete screen, compress it down to quarter size then display it on the current screen, at position x,y. |VSPRITE,l,r,t,b,x,y(,sscr(,dscr)) Copy a window from one area of the screen to another. Parameters are left, right, top, bottom of the source window and x, y of the top left corner of the destination - all in VIDI coordinates (1,1 to 80,200) all must be present. If both screen parameters are omitted the current screen is used, if one screen parameter is present then it assumed to be the source, with the current screen as the destination. |VWIND0W(,l,r,t,b) Sets a scan window for iVREAD to use. Parameters are - left, right, top, bottom. The coordinate system used is 1 to 80 for 'x' (columns) left to right and 1 to 200 for 'y' (rows) top to bottom. 0 means the relevant edge of the screen, i.e.Parameters of 0,0,0,0 means the whole screen. The window defined has a maximum full screen of 80 columns and 200 lines, where top left = 1,1. bottom right = 80,200. When a window is defined, VIDI uses it for the IVREAD and SVCLEAR commands. Default=whole screen. |VXP0S(,n) Sets horizontal frame position. 0-31. Default=16. |VYP0S(,n) Sets vertical frame position. 0-127. Default=48. TROUBLE SHOOTING Video signals from different manufacturers equipment vary considerably and since it is impossible for us at Rombo Productions to test out every conceivable video source, some fine tuning may be required to obtain optimum results. If VIDI is not displaying a picture at all then first check that the unit has been installed correctly. Check all connections, particularly the VIDEO OUT on the video. This is almost always directly beside the VIDEO IN with an identical socket, make sure you have connected the right one. If your camera/video does not have a BNC type of socket, check that the VIDEO OUT signal is actually composite video and not RGB or modulated RF. It ic possible to convert RGD into composite video via a patch lead - check with your video supplier, however, RF (or TV) modulated signals are not suitable for VIDI. Some videos are fitted with phono sockets for VIDEO OUT and in this case you will require a phono/phono cable _ available from hi-fi or video shops. A few videos and televisions are fitted with a SCART interface (Peritel in France). Suitable composite video is available from this interface via the correct lead - consult your video dealer. VIDI will only grab a frame after the detection of a vertical sync .pulse within a certain amount of time. Some videos produce erratic sync pulses on pause and fast search and VIDI may not respond correctly in this mode. The aspect ratio of the grabbed picture is controlled by a small blue adjustable resistor situated near to the edge connector lying flat on the VIDI board. This is calibrated before depatch, and as this setting interacts with the software controlled horizontal position it should only be adjusted with care. This adjustable resistor also controls the detection of sync signals to a small degree, if your screen looks like a chessboard when first switched on (with the video attached) turn this control clockwise until the screen displays the video picture. All video pictures produce signals of varying strengths. The digital contrast and brightness controls are initially set by on board variable resistors. These are the blue square components situated and labelled next to the VIDEO IN connector. The CONTR. and BRIGHT controls are calibrated by ROMBO, so before adjusting, the original setting should be noted. The CONTRAST control is unlikely to be of any use but the BRIGHTNESS control is useful to give fine adjustments for the software settings. This is especially so when using Mode 0, as the software contrast and brightness settings are ignored. Use the external BRIGHTNESS control to set the overall brightness of Mode 0. TECHNICAL DETAILS The Amstrad Computer screen has a maximum resolution of 610 horizontal pixels by 200 vertical lines. An average TV picture has a definition greater than this, so compromises have to be made somewhere!. To maintain a correct aspect ratio on the computer screen, the VIDI frame store is 'windowed' over the TV picture and grabs some 757. of this picture. However if required clever use of the RSX commands can enable whole frames to be stored and 'edited' together. The software Contrast and Brightness controls do not actually modify the video signal, instead they alter the digital sampling width (contrast) and level (brightness). Practice may be required to understand their actual effect on the sampled picture. The VIDI hardware stores the grabbed frame into its own internal memory, from where it can be moved to the computers screen or other memory. In 2-SCR mode, two screens are filled and displayed alternately. These are located at addresses &C000 (the normal screen) and &4000, each occupying &4000 bytes(l6K). When using this mode, it is advisable to set HIMEM in BASIC to be ¯<3FFF (16383>or less to avoid program or variables being overwritten. 1-SCR mode will always use the standard screen at &C000 and HIMEM need not be altered. To enter the program in a specific SCR mode, use |VIDI,l or |VIDI,2. We are pleased to help with any technical queries relating to VIDI and receive suggestions for future enhancements. Software upgrades and developed applications will be made available from time to time for a nominal charge (media cost + PI.P). If you have any routines or programs you would like us to include please send them to the above address (copyright will be public domain). Thank you. ROM SOFTWARE UPDATE The VIDI software is available on ROM from us direct at a cost of only GBP 4.95 including VAT and P&P. This ROM will require a rom box to be of any use. The original ROMBO B-Rom box is ideal for use with VIDI. It costs GBP 34.95 inc. and ordered with the VIDI ROM upgrade the ROM is included FREE - i.e. GBP 34.95 for both ROMBO + ROM! Please send cheque with order or any enquiries direct to: ROMBO Productions 6 Fairbairn Road, Kirkton North, Livingston, Scotland EH54 6TS Tel. 0506 414631 Fax. 0506 414634 PAGE MAKER OVERLAY There is a file included on the VIDI disc called PAGEMAKE. OVT. This is an overlay file allowing VIDI to be used within the AMX PageMaker program. The PA6EMAKE.OVT file should be copied onto your working copy of the Pagemaker disc by running PAGEMAKE.BAS. The VIDI is accessed via the 'SCANNER' option within Pagemaker. AMX PageMaker works in mode 2. The SCANNER option allows VIDI to grab pictures direct to the screen in mode 2. When you select 'SCANNER' you will notice a status line appear underneath the command - Brightness 8 Vertical 64 Horizontal 22 The brightness refers to the iVBRI parameter in VIDI. It can be increased by pressing the EXECUTE button. When it goes past IS it will wrap around to 0. The keyboard cursor keys are used to control the Vertical and Horizontal settings. The frame can be positioned so that any part of the picture is available to any part of the screen window. The MOVE button will freeze the current frame whilst pressed. The CANCEL button will capture the current frame and return to the PageMaker options. If a GRAPHICS WINDOW is currently defined within PageMaker then VIDI will only grab into the part of the screen lying inside the graphics window. This feature, for example, allows powerful dynamic displays to be generated with text and moving pictures on the screen at once! Pictures requiring better shading than mode 2 should be grabbed and saved outside of PageMaker using the normal VIDI commands in mode 0 or 1. We have achieved best results with mode 1. After conversion with the |VPAGE command these can be loaded into PageMaker via the FILE - SCREENS option. Remember the top of the screen is lost when loading into PageMaker so frame your picture accordingly. The BASIC Programs. Several BASIC programs are included on the VIDI disc as examples of using the VIDI RSX tfommands. Me recommend that you load and list these programs to see just how simple it is to produce apparently complex digitised displays. The BASIC programs all have a filetype of *.BAS*. The start of each program listing contains notes on the use and function of the RSX commands within the program. This package is Copyright 1986, ROMBO Productions. All rights reserved. The hardware and software design and composition of VIDI are copyright. The software may only be copied by the owner for backup purposes. No part of the software may be incorporated into other distributed programs without the prior written consent of the copyright holder. Any digitised pictures or effects produced with VIDI are NOT subject to this copyright except for the above conditions. Hardware design and concepts - Colin Faulkner and Marcus Sharp. Software design and programs - Keith Wilson Printer dump routines - Richard Siddons-Corby.