Date: 27-Aug-92 21:23 EDT From: D. P. Research Corp [75530,3041] Subj: Early TSR specs (sent to shannon) [The following is the content of one of the DPRC source documents used as a specification for our own people to write VR input device drivers under MS-DOS. Additional comments added in []. Since DPRC is not in the driver business nor does it wish to be, the release of this document into the public domain does not constitute a breach of confidentiality.] Generic/high-level input device driver spec for DOS platforms Circulated: 12-1-91 Prologue Likely the simulation group [of DPRC] building code for prototyping on low-end PCs will need to pick up inputs from many devices. Some of the many input devices are also output devices (or may have "scales of operation"/temperature ranges/etc). Since we do not want to spend alot of time writing drivers for the plethora of devices out there, it would behove us to define an interface which allows us to switch out old devices and in new ones without recompiling or relinking the core code for our renderers. Considerations In everyday use the user community may not necessarily have (or want to use) keyboards. Joysticks may be limited but they have analogues if their "positions" are actually the encoding of body [or body suit] switches. Desired traits - different drivers should be loadable before application starts; user of drivers should not need to know how to "program" other than setting IO port addr for driver (and only if absolutely not defaultable) - drivers should "layer"/nest using exec/system(). pure TSR not needed; layers should remove themselves when application finishes; layering order is allowed to be important - more than one input device may be used; each should be able to send its own commands;each can load table (and reload tables) of translations; which map movements to gestures/commands - commands (gestures recognized by drivers) are 4 byte strings packed into a long (unique in first 4). command lists will initially be loaded as part of executable and we will use toolbox to fix-up prototypes. - lowest layer driver is driver VR-bios (so drivers have common debug/printf/file IO layer) to use as a "library"; base library has own int 2F register/unregister section. it registers a "VR bios" as its key; to register start with ah of unused value (relative to undocumented DOS book) and move upward; - code to register/check if VR bios is loaded yet is separate C callable obj file for others to link with (using C or C++). make it MSC|TC|ZTC callable; base lib is list of fn-ptrs as call-ins; fn ptrs can be rewritten by drivers of another layer; use macro-include file to define common IO funcs to look like plain C callables - application registers "callback" delay function with driver for use in chewing up time, callback is called during calibration to determine machine speed for sw loops; callback delay function can poll IO ports, do partial repetitive calcs etc. called with number of "steps" to take. each step roughly equal size. - driver should return callback function to be used by app to obtain current driver specific info plus generic 6dof info & cmd - driver called by app at unpredictable intervals. driver must maintain current state inside itself. driver is allowed to use 18.2hz and 1msec hooks to calibrate and setup as well as run. will recalibrate whenever app layer registers new delay callback. - current viewport/viewing origin/orientation is an "input" device which can be modified/talked to by other layers (certain actions/reactions will force it to re-orient) also consider head trackers (or HMDs) - change-delta notification callback to app when motions exceed registerd threshold; thresholds expressed in % of device value range as scaled int Potential input devices on PC platforms mouse keyboard (consider key groups sep) trackball 2 joysticks in periscope-lever orientation spaceball IR movement sensor 3d mouse ulrasonic position sensor temp sensors head orientation tracker 3d-boom adrenal activity detector heart rate encoder body salts encoder hall-effect sensor galvanomic/static displacement sensors alpha wave encoder whistle/clap detector pedalo speed sense body-english/weight shift sensor muscle-flex scanner centripital effect sensor voice recog circuit/chip/(may require sep PC) chemical composition/ph/ionic concentration sensors