home *** CD-ROM | disk | FTP | other *** search
- (in-package :oou)
- (oou-provide :P330-vp)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; P330-vp.lisp
- ;;
- ;; Copyright ⌐ 1991 Northwestern University Institute for the Learning Sciences
- ;; All Rights Reserved
- ;;
- ;; author: Michael S. Engber
- ;;
- ;; video player object for Pioneer model 330 "JukeBox" laserdisc players
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- (oou-dependencies
- :P4200-vp)
-
- (export '(P330-vp))
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- (defclass P330-vp (P4200-vp)
- ((current-disk :reader current-disk
- :allocation :class)
- (current-side :reader current-side
- :initform :A
- :allocation :class)))
-
- (defmethod vp-load :before ((vp P330-vp) &key disk side)
- (unless (and disk side)
- (multiple-value-bind (cur-disk cur-side) (P330-current-disk vp)
- (setf disk (or disk cur-disk))
- (setf side (or side cur-side))))
- (if (and disk side)
- (P330-load-disc vp disk side)
- (error "330's require a disk number and side to load")))
-
- (defmethod vp-seek :before ((vp P330-vp) frame
- &key
- (disk (current-disk vp))
- (side (current-side vp)))
- (declare (ignore frame))
- (unless (and (= disk (current-disk vp)) (eq side (current-side vp)))
- (vp-load vp :disk disk :side side)))
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- (defmethod P330-load-disc ((vp P330-vp) disk side)
- (slot-makunbound vp 'current-disk)
- (pld-cmd vp (ecase side (:A "ZA") (:B "ZB")) :arg disk)
- (setf (slot-value vp 'current-side) side
- (slot-value vp 'current-disk) disk))
-
- (defmethod P330-current-disk ((vp P330-vp))
- (when (char-equal #\1 (char (pld-cmd vp "?D") 0))
- (let ((face-code (parse-integer (pld-cmd vp "?Z"))))
- (values (ceiling face-code 2) (if (evenp face-code) :B :A)))))
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-