'VDISC2.BAS ' 'Controls a Pioneer CLD-V2400 Laserdisc Player ' 'For use with the "Uncertanties" videodisc ' 'This version uses the material from the start of the 'interactive portion to wait for a button press. ' 'Before running the "palindrome", the status of a 'switch on pin 4 is checked. If the switch is on, 'the palindrome audio is played. If not, the audio is 'disabled before playing the palindrome. ' 'Assumes that player is set for powerup non-load and '1200 baud SYMBOL txd = 0 SYMBOL rxd = 1 SYMBOL crx = 13 SYMBOL btnpin = 2 SYMBOL btnled = 3 SYMBOL audpin = 4 OUTPUT btnled INPUT audpin HIGH btnled SLEEP 20 'Give the player a chance to initialize SEROUT txd,N1200,("SA",crx) 'Spin up the disc LOW btnled SLEEP 20 'Wait for spinup SEROUT txd,N1200,("LOSE",crx) 'Seek the lead out area to map the disc SERIN rxd,N1200,("R") 'Wait for response from player GOTO setup play: DEBUG cls,"Playing..." LOW btnled SEROUT txd,N1200,("3AD1SE21050PL",crx) 'Stereo Audio On 'Seek frame 1 'Play to 21050 SERIN rxd,N1200,("R") 'Wait for response setup: DEBUG cls,"Entered Setup..." IF pin4 = 0 then audoff 'audpin, can't use symbol! SEROUT txd,N1200,("3AD",crx) 'Audio on SERIN rxd,N1200,("R") 'Wait for response goto setup2 audoff: SEROUT txd,N1200,("0AD",crx) 'Audio off SERIN rxd,N1200,("R") 'Wait for response setup2: SEROUT txd,N1200,("21100SE23194SMPL",crx) 'Seek frame 21100, set stop at 23194, 'Start the disc playing SERIN rxd,N1200,("R") 'Wait for response HIGH btnled loop: DEBUG cls,"Entered Loop...",cr BUTTON btnpin,0,255,0,B11,1,play SEROUT txd,N1200,("?P",crx) 'Query Player State SERIN rxd,N1200,("P0"),b1 'Wait for P0X, put X in b1 DEBUG b1 IF b1 = "4" THEN loop 'Play Mode IF b1 = "7" THEN loop 'Search Mode GOTO setup 'I query the audio switch during the wait loop setup to make the button 'more responsive. This has been running all morning, and I'm punching the 'button every now and again to see if I can crash it. 'Takes about 60% of stamp memory with debug hooks removed