Welcome to MINI-ZAP, a program to use your PC or Portfolio as a programmable Remote control (or Zapper) for your TV, VCR, CASSETTE, CD or whaterver. MINI-ZAP was specially made to run on an ATARI Portfolio (a palmtop computer) and has never run on a standard PC till august 23 1996. The ATARI Portfolio's display screen is only 40x8 characters so on standard PC's it will not use the full screen (you can switch to mode co40 if you like). Because for this international developping competition I changed the MINI-ZAP to communicate by a device driver and now it will run on every standard PC. MINI-ZAP is a derivative of XP-ARCS, the professional version which runs on standard PC's only and uses a much more complicated IR interface. With this simple MINI-ZAP IR interface you will reach a distence between 0.5m (2 feet) and 4.5m (15 feet), also dependent of the IR sender LED (so use the best one you can get ...). For better results put the IR sender LED in a reflector case. One thing, if running on a Portfolio you need a parallel interface, so if you don't have one ... buy one ! *********** MINI-ZAP ... The story ************** First version was made in march 1991 for CP/M computer systems and did only support JVC VCR's. It's name was VIDEO.COM First MS-DOS version was made in january 1992 and suppurted all +/- 45kHz Zappers, so the first real programmable PC-ZAPPER. It's name was REMOTE.EXE First Portfolio version was made in april 1993 and was nearly the same as the first MS-DOS version. It's name was PF-REMO.EXE After the PF version only the MS-DOS version has been changed. In november 1994 a user interrupt has been added so the user could create his own commands (in assembly language) to control IN/OUT ports, and run this 'program' under 'REMOTE.EXE NewPoly' as it was called. The program was not limmited to do Infra Red control only and also supported programmable timers. In October 1995 there was the first 'professional' version and REMOTE.EXE looked more like a SYSTEM than a program from now on. The user could create his own programs and device drivers too. Not in assembly anymore but in a special 'C' compiler. This version (REMOTE95) was also able to measure the Zapper's carrier frequency and to simulate these frequencies between 25kHz and 125kHz in 16 steps (all analogue ....). In march 1996 this analogue version of the hardware was digitalized. One processor on the PCB (a PIC 16C54HS) does all the work, and now, 5 years after the first CP/M version it works as I always wanted. The current name is XP-ARCS which means : Xiac Professional's Appliance Remote Control System, which is a lot more then just a programmable Zapper .... Because PF-REMO has never been changed since 1993 and used the Dutch language, I translated it for english speaking people and changed it's name to XP-ZAP (I don't have to explain this name ...). For better frequency simulation (5 years of experience) I changed the fixed frequency from 45 kHz and duty-cycle 50% to 35.6kHz and duty-cycle 33% which gives much better results. =========================================================================== Changes from XP-ZAP to MINI-ZAP were last made september 4 1996, which include : - Communication by a device driver, XP-ZAP's hardware settings were fixed to use Portfolio's 8255 PPI which is NOT compatible with standard PC's LPT port. The different device drivers solve this problem. - Quartz independent (as long as your PC's quartz >= 4.77 MHz) by using an external IR clock signal of 50 or 60 Hz (dependent of your mains frequency) for one time high accurate PC speed measuring. XP-ZAP's carrier frequency (a software routine) was fixed to 35.6kHz when running on a 4.9 MHz Portfolio. - Port address independent, XP-ZAP's port I/O was fixed to 8078h because of the Portfolio's 8255s PPI address. Now you can use every port address you want. - Interrupt 8 correction since interrupts are disabled when receiving or transmitting IR codes. Still, the clock can slightly differ from what it should be. - Better decoding procedure for IR codes since there were codes detected shorter than the sample time (which resulted in an error). - Automatic RC5 code detection and simulation. RC5 codes differ from standard IR codes because of a toggling bit in the code. This toggling is now simulated in MINI-ZAP. This new feature is NOT tested very well but it looks like it works fine. If any problems with RC5 zappers then mail me a.s.a.p. ! - Frequency analysing and simulation. MINI-ZAP can measure the zapper's carrier frequency in range 10Hz (!) to 53.5kHz and can simulate these frequency's in range 17.8kHz to 53.5kHz (most zappers use a carrier frequency in range 30kHz to 45kHz). - Automatic and manual DLPF (Digital Low Pass Filter) settings. Automatic settings are calculated from the zapper's carrier frequency. If no carrier detected then the DLPF is set to a fixed value of 5. If the DLPF is set manually then the carrier frequency can NOT be measured and it will be fixed to the standard value of 35.6kHz. Use the manual DLPF settings only if there are problems when analysing the zapper. - Three additional commands are added to XP-ZAP.EXE which include : CLS (Clear the screen) ;AutoRC5: (switch RC5 detection on or off) ;IRdelay: (set the length of a delay between 2 to be transmitted IR codes) See MINI-ZAP.DOC for details. - Cancel transmission of IR codes by pressing [ESC] key, only handy when using AUTO-ZAP functions (see MINI-ZAP.DOC) - Transmit and Receive sample frequency correction. The sample frequency should be 107000 Hz for correct analyses. The deviation factor measured by PC-SPEED.EXE (in milli percent (m% = %/1000) is written to the HARDWARE.DAT file. ANALYSE.EXE uses the RxF factor and XP-ZAP.EXE uses (RxF + TxF). PC-SPEED assumes that RxF = TxF so, TxF will be set to 0 in the HARDWARE.DAT file. If you like, you can figure out yourselve if your computer's TxF is realy 0 (test the 50Hz pattern in the TESTFREQ.RCU file in XP-ZAP.EXE and use an oscilloscoop). The current TxF in HARDWARE.DAT is set to 4446 m% (=4.446%) because I measured the TxF of the portfolio and realysed that it was NOT equal to RxF !! In this case the Tx sample frequency is : 107000 * ( 1 + (RxF+TxF)/(100*1000) ) = 111708 Hz which means that it transfers faster than it receives ! NOTE : The MINI-ZAP .RCU files are NOT (!) compattible with the XP-ZAP .RCU files since the carrier frequency has been added to the .RCU files. In a text editor you can solve this problem by typing the zapper's carrier frequency at the second line (the line under the device name). Be sure not to leave any blank lines in these files ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Changes from MINI-ZAP 1.06 to MINI-ZAP 2.03 were last made september 15 1996, which include : - Automatic correction factor calculatings. This is done by PC-SPEED using timer interrupt 8 and a powerfull routine. This is done for the best results since I noticed that on most PC's RxF <> TxF ! By the way, RxF and TxF are now called RxC and TxC and are not 100% compattible with RxF or TxF. PC-SPEED measures the interrupt 8 interval as well (I08 value) and the effective frequency of the computer's processor (this can differ a factor 14 with the real frequency if you switched on some processor cache). Because of this new feature the drivers are updated as well (PC-SPEED does not run with MINI-ZAP 1.03 drivers). PC-SPEED calculates a 1ms delay to use as a delay factor for XP-ZAP and ANALYSE (this value has been added to HARDWARE.DAT at the bottom line) - Driver PC-FAST.SYS is replaced by PC-486.SYS which has code optimized routines specially for 486 and PENTIUM processors. - XP-ZAP and ANALYSE are updated and work more effective by the new RxC and TxC values. For faster calculations and smaller EXE code more routines are translated from Turbo Pascal to assembly language. - I created a patch for Turbo Pascal's CRT unit that it will NOT measure a delay factor by timer int 8 since this is very irritating for ATARI Portfolio. XP-ZAP and ANALYSE will now run with the normal display settings (on portfolio) which are : External : normal Internal : normal Refresh : normal Speed : normal The IR analyses and simulations will not be interrupted once a second anymore since normal speed calls int 8 only once in two minutes, this is a very important improvement ! NOTE : Before starting PC-SPEED you HAVE to set the speed to FAST since PC-SPEED uses interrupt 8 !!!! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Changes from MINI-ZAP 2.03 to MINI-ZAP 2.13 were last made november 29 1996, which include : - Zapper key pop-up. This is a very usefull feature since the zapper command you selected (using the arrow keys) during pop-up can be transferred by pressing the [CR] key, so you don't have to type the command. To get this pop-up press the F1 key or type ;PopUp: See MINI-ZAP.DOC for details. - LIST command has been removed because it's not usefull since this new key pop-up. - ;PopUp: command has been added so you can place this in XP-ZAP.INI if you like (;PopUp: does the same as pressing the F1 key) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Changes from MINI-ZAP 2.13 to MINI-ZAP 3.07 were last made may 20 1997, which include : - The use of Hotkeys in the Pop-up menu. When popping-up the zapper keys you can easily transmit commands by pressing a single key. Also, when typing commands at the MINI-ZAP command line, you can use these hotkeys by typing the hotkey in CAPITALS. The commands '0' to '9' (single keys) are automatically detected as hotkeys (only if your zapper has a key with the name 0, 1, 2, .., 9). The use of hotkeys at the command line can be switched ON or OFF with the ;Hotkeys: command. - ;Hotkeys: command has been added to switch ON or OFF the use of Hotkeys at the MINI-ZAP command line. It will NOT switch off the use of hotkeys during pop-up. - Page-Up & Page-Down keys are programmed to change the selected device. This will work during pop-up als well as at the command line ! - Serious change in memory efficiency ! First the use of drive space has been reduced by converting the .RCU (text) file to a .RCD (data) file. These .RCD files are now about 50% smaller than their .RCU files. Second, the use of RAM space has been seriously reduced ! By loading the .RCD files into memory it allocates only the size of these files, a reduce of about 65% !! The limit of the previos versions of MINI-ZAP was about 6 zappers, now it is about 16 (or more) zappers ! In addition, this new version of MINI-ZAP will work FASTER because the procedures and functions needed for these .RCD files are simpler. - Very accurate XPSU-numbers and deviation-factors are calculated by a new version of PC-SPEED. It will also check if the XPSU number used to transmit is equal to the receive XPSU-number. Therefore the RxXPSU and the TxXPSU are now both written to the HARDWARE.DAT file. - When running MINI-ZAP on a VGA screen it is in colour, this looks better when you use it in WINDOWS 3.1x or WINDOWS 95. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Changes from MINI-ZAP 3.07 to MINI-ZAP 3.08 were last made october 23 1997, which include : - Single key transmit. After bying a SONY Minidisc recorder I found out that programming disc and song titles, with the delivered remote control, is not an easy job. It would be much handier to use a standard keyboard to do it. After a small modification to the MINI-ZAP program, this new feature was realized. Now every key (except the F10 key ...) can be easily defined (so also the ENTER or ESCAPE key). To activate this 'single key transmit' press F10 during the PopUp feature. To program the single keys is a bit more complicated, see MINI-ZAP.DOC for details. ************ THE MINI-ZAP FILES **************** Copy these files to some directory : XP-ZAP.EXE THE PC Zapper simulator ANALYSE.EXE A program to read the codes from your zapper, and creates a .RCD file (RCD = Remote Control Data) PC-SPEED.EXE A program which uses an external 50/60 Hz IR clock for analysing your PC's speed (only once needed). Results are written to HARDWARE.DAT LPTPORT.EXE A program which displays your PC's LPT port base addresses. Not for ATARI Portfolio ! RCU2RCD.EXE A program to convert old .RCU files to new .RCD files RCDEDIT.EXE A program to modify your .RCD files (delete keys, change their names etc.) PC-ZAP.SYS a device driver to run MINI-ZAP on standard PC's (under 386 DX 33) PC-486.SYS a device driver to run MINI-ZAP on 486 or PENTIUM PC's PF-ZAP.SYS a device driver to run MINI-ZAP on ATARI Portfolio. HARDWARE.DAT A sample file for Portfolio's hardware settings JVCVCR.RCD The codes from a JVC VCR Zapper SONYCD.RCD The codes from a SONY CD-player Zapper MITSUTV.RCD The codes from a Mitsubishi TV Zapper 50HZTST.RCD A test RCD file (see MINI-ZAP.DOC) RCDFILES.TXT A file which tells XP-ZAP which RCD files you want to get loaded. XP-ZAP.INI A file with XP-ZAP commands which is executed right after you startup XP-ZAP (like autoexec.bat). MINI-ZAP.DOC A documentation of XP-ZAP, ANALYSE and PC-SPEED KEYCODE.TXT Key codes for 'direct keyboard key transmit' (use these codes in ANALYSE.EXE) MINI-ZAP.GIF A simple schematic of the hardware you need for MINI-ZAP to connect to parallel port IR-CLOCK.GIF A schematic to build a mains powered 50/60 Hz IR clock for using with PC-SPEED.EXE (only once needed) ZAP-HW.GIF A picture of the hardware build in a connector CONFIG.SYS A sample CONFIG.SYS to setup ATARI Portfolio README.1ST The file you've just read .... README.2ND This file .... ************* WHAT NEXT ? *************** View the MINI-ZAP.GIF, ZAP-HW.GIF and IR-CLOCK.GIF and build the schematic (no PCB needed). NOTE : If you connect the MINI-ZAP hardware to a standard PC's LPT port then it is more confortable to replace the IR sender (D2) by a coaxial cable (50 Ohm; 1 meter) and connect the IR sender to the end of that cable. Use good IR sender LED like VX 301 : 80 mW/sr <--- recomanded TSHA-6203 : 50 mW/sr LD 274 : 30 mW/sr Use good IR sensor diode (NO transistor !) like SFH 205 <--- recomanded BPW 41 N Notice in the schematic that the sensor is placed to block and NOT to conduct !! To findout Kathode and Anode of a diode use a diode tester |\ | A ------------- K |/ | ********* INSTALLING MINI-ZAP on Portfolio *********** Transfer the next files to the Portfolio : PF-ZAP.SYS CONFIG.SYS XP-ZAP.EXE PC-SPEED.EXE ANALYSE.EXE ( if space enough left on the PF's A drive, else run PC-SPEED first, delete PC-SPEED.EXE and then transfer ANALYSE.EXE ) HARDWARE.DAT ( Hardware settings for a NON boosted up Portfolio, if you own one then you don't have to use PC-SPEED ) JVCVCR.RCD Only if you have a JVC VCR SONYCD.RCD Only if you have a SONY CD-player MITSUTV.RCD Only if you have a Mitsubishi TV 50HZTST.RCD a 99.8% error free test for Portfolio since the interrupt (INT 08) is only called once in two minutes. RCDFILES.TXT (modify later) XP-ZAP.INI (modify later) Now, connect the ZAP-hardware to the PF's parallel interface. Set the size of your PF's C drive to a minimum (fdisk 8) because MINI-ZAP needs a lot of memory ! Copy CONFIG.SYS to the C drive and reboot the Portfolio Set the PF's display mode as follows : External : normal Internal : normal Refresh : normal Speed : fast (only when running PC-SPEED.EXE !!!!) ********* INSTALLING MINI-ZAP on standard/fast PC *********** Copy all files to some directory on your C drive (f.e. C:\MINI-ZAP). add the next line to your CONFIG.SYS file DEVICE=C:\MINI-ZAP\PC-ZAP.SYS (PC's under 386 DX 33) DEVICE=C:\MINI-ZAP\PC-486.SYS (486, PENTIUM PC's) Reboot the computer now. ********** Running MINI-ZAP's related programs ************ ------- (1) PC-SPEED.EXE Before starting PC-SPEED.EXE on ATARI Portfolio set the display screen's speed to FAST ! Startup PC-SPEED.EXE, if incorrect port address then change it by pressing '1', if different mains frequency (no 50Hz) then change it by pressing '2'. Hold your external IR-clock (mains frequency) close to the IR sensor and press 's' (start analysing speed). LED (D1) will light up when measuring so let PC-SPEED do what it has to do till the LED is off. Now your screen will show some messages (most are useless for you). Check the correction factors (RxD, TxD) and the XPSU number (Xiac Professional Speed Units). Samples : Portfolio (not boosted) RxD = +/- 0.1% XPSU = 2 Standard PC (8086, PC-ZAP.SYS) RxD = +/- 0.7% XPSU = 7 486 DX2 66 (using PC-486.SYS) RxD = +/- 0.8% XPSU = 72 Portfolio (not boosted) TxD = +/- 0.1% XPSU = 2 Standard PC (8086, PC-ZAP.SYS) TxD = +/- 0.7% XPSU = 7 486 DX2 66 (using PC-486.SYS) TxD = +/- 0.8% XPSU = 72 I08 will be +/- 54.8ms on standard PC and +/- 998ms on ATARI Portfolio. Fe is the effective frequency of your computer's processor. Txc a number indicating the times a loop is passed. Tx the time needed to transmit a code which takes 20ms to receive. (Tx = +/- 20ms). RxD and TxD the deviation factors (for correction in ANALYSE and XP-ZAP). Repeat this speed analysing to see if the XPSU number does not change (if you hold the IR-clock in your hands then keep it very steady !) The faster your PC, the higher XPSU will be (note that XPSU is NOT driver independent so XPSU = 72 with driver PC-486.SYS is not equal to XPSU = 72 with driver PC-ZAP.SYS !!!!!!). The correction factors need to be as low as possible (f.e. not above 5000 m%). If you are not going to change your computer's speed then you can throw away this IR-clock now but you can better use it as a check point in ANALYSE.EXE). PC-SPEED will write it's data to HARDWARE.DAT which is a text file containing six lines : line 1 : port address (hexadecimal if '$' is first character) line 2 : Receive XPSU-number (your computer's receive speed) line 3 : Transmit XPSU-number (your computer's transmit speed) line 4 : RxD (deviation factor for Rx sample frequency in m%) line 5 : TxD (deviation factor for Tx sample frequency in m%). line 6 : A factor to have a 1ms delay. NOTE : Hexadecimal numbers are always written like this : $8078 or $378 where '$' means that the number typed is hexadecimal. NOTE : If you are sure your Portfolio is not boosted up then you don't have to use PC-SPEED since the current values in HARDWARE.DAT are for a standard PF running about 4.9 MHz. If any problems in PC-SPEED then read the MINI-ZAP.DOC documentation file. ------- (2) ANALYSE.EXE Before starting ANALYSE.EXE on ATARI Portfolio set the display screen's speed to NORMAL ! Startup ANALYSE.EXE and readin the codes from your zapper. (creates a .RCD file) See documentation if you can't work it out yourself. --> Check number of pulses YES Check length of code YES Set DLPF 0 (automatic settings) --> Add the .RCD file you just created to RCDFILES.TXT NOTE : The distance between zapper and IR-sensor is rather important for correct frequency analyses, therefore check the analysed frequency a number of times at different distances and see if it is in range 30kHz to 45kHz. Usually a distance of +/- 6cm (2 inches) is OK but that depends of the battery's state as well .... NOTE : A good check point is to use your external IR-clock (keep the IR- clock allways very close to the sensor if you want to use it correctly). The pulses counted are 2 and the code length is 20 ms (if 50Hz) or 17ms (if 60Hz) and forget the extra start code if showed (this can differ from these values). If the analysed values differ a lot (say more than 2%) then try running PC-SPEED again. ------- (3) XP-ZAP.EXE Before starting XP-ZAP.EXE on ATARI Portfolio set the display screen's speed to NORMAL ! Startup XP-ZAP and wait till the 'prompt' appears (or the pop-up menu). Switch to the device you just have made by typing a '\' following the name of that device (or press the Page-Up c.q. Page-Down key). So, if the device is called 'VCR' then type \VCR [CR] and you will see that the 'prompt' will change to \VCR> press F1 to get a list of the commands you just named in ANALYSE (ESC to leave this pop-up again). Select a command with the cursor- keys, point the IR LED to that piece of equippment and press the [CR] key to transmit the code. If it doesn't work then try a nearer distance (let's say 0.5 meter (or 2 foot)) and try again. If it still doesn't do anything then read the MINI-ZAP documentation. ***************** About SHAREWARE ****************** This program is NOT freeware !!!!! You may use and test it for a month, ask me questions or help about it, but after then you have to pay a small fee of 25 Dutch guilders if you still want to use MINI-ZAP. After paying this fee (contact me by Email before doing that) you get 3 additional files. One is RCDSHOW.EXE which displays the RCD codes in graphics to your PF's screen so you can see the big differences between Zappers and use it as well for testing Zappers (if you repair any equippment). The second is HARDCOPY.COM, a TSR which makes a graphical hardcopy of the Portfolio's screen to every EPSON compattible printer. And the third is ZAP-HW2.GIF, a schematic to get better results (longer distances) using a more complicated circuit with an external 9V battery. If you don't want to pay this 25 guilder fee but you do want to use MINI-ZAP than contact me by E-mail and we can discuss about it. Keep one thing in mind and that is that I've putten lots and lots of time in this program. ******************* The author ********************* XP-ZAP.EXE, ANALYSE.EXE, PC-SPEED.EXE, RCU2RCD.EXE, RCDEDIT.EXE, PC-ZAP.SYS, PF-ZAP.SYS and PC-486.SYS are copyrighted by M.L.H. van der Meij. You are not allowed to make any changes to these programs. You are allowed to copy it as many times as you want and place it at every public domain server or BBS as long as you let me know where you have uploaded it. (C) 1997 M.L.H. van der Meij; All rights reserved Let me know every experience you have with MINI-ZAP and mail me the .RCD files you created (I have a collection of them ....) Xiac Professional (TM) ing M.L.H. van der Meij Arend Verkleystraat 31 2172 BD Sassenheim The Netherlands Email : mr.xiac@mailbox.hol.nl