home *** CD-ROM | disk | FTP | other *** search
-
- Autodesk 3D Studio
- Release 3
- IPAS 3 Toolkit
-
- README.DOC
-
- February 18, 1994
-
- Copyright 1994 by Autodesk, Inc.
-
-
- 1. GENERAL INFORMATION
- ======================
-
- WATCOM 9.5 has some known memory allocation problems.
- You should upgrade to the b level patch or run the risk of General
- Protection Faults.
-
-
- 2. NOTES ON THE DOCUMENTATION
- ==============================
-
- 2.1 Page 165, pxp_get_item () index Parameter:
-
- The first item (index=0) in the drawing database is *always* the
- ambient light.
-
- 2.2 Page 125, EXP_AXP_VIEW packet command:
-
- EXPbuf->nivfo should read EXPbuf->vinfo.
-
- 2.3 Page 34, Col24 Struct:
-
- unsigned char r,g,b; should read unsigned int r,g,b;
-
- 3. KNOWN TOOLKIT LIMITATIONS
- ============================
-
- 3.1 Symptom: The gfx_bitmap_info function may return invalid bitmap
- width and height information for some .GIF files not created by 3DS or
- Animator Pro, causing subsequent gfx_load_bitmap calls to fail.
-
- Fix: Instead of calling gfx_bitmap_info, call the function
- do_bitmap_info. This detects .GIF file loading and uses proper code to
- retrieve the bitmap info.
-
- 3.2 Symptom: Flags for mesh objects in the direct-call interface
- (ItemMesh.flags field) are not properly set or returned.
-
- Fix: There is currently no workaround.
-
- 3.3 Symptom: The BXP ClientGetFrame (BXP_GET_FRAME packet command)
- mechanism does not work properly. If a BXP is asked to get a
- subsequent frame, even though it returns successfully, 3DS report it
- as a failure.
-
- Fix: There is currently no workaround.
-
- 3.4 Symptom: The SXP Client3DOpac function is not getting called by
- 3D Studio. All texture map calls whether opacity, texture, shininess
- are being piped through Client3DText, instead of piping the color ones
- thru Client3DText and the monochrome ones thru Client3DOpac.
-
- Fix: There is currently no workaround.
-
-
- 4. WATCOM COMPILER-RELATED LIMITATIONS
- ======================================
-
- 4.1 Symptom: With WATCOM 9.5a the first time you malloc in a 3D Studio
- session, it will fail.
-
- Fix: Try malloc'ing twice before you report a malloc failure.
-
- 4.2 Symptom: Iscan.c is unstable with WATCOM 9.5.
-
- Fix: There is currently no workaround.
-
-
- 5. DEBUGGING IPAS ROUTINES
- ===========================
-
- 5.1 Special IPAS Libraries
- ==========================
-
- A special version of the IPAS libraries is provided to allow debugging
- of IPAS routines using various commercially available debuggers like
- the ones provided by MetaWare, WATCOM and Phar Lap. These libraries
- differ from the normal libraries in that they execute an INT 3
- (debugger trap) upon entering the IPAS routine for the first time. The
- debugger can then use this opportunity to determine the base addresses
- of the code and data segments used by the IPAS routine and the
- locations of symbols and code therein.
-
- Use the debugging libraries in place of the normal libraries during the
- linking step of IPAS procedure creation. The names of the debugging
- libraries and the normal libraries they replace are as follows:
-
- XPMW30D.LIB replaces XPMW30.LIB
- XPMW31D.LIB replaces XPMW31.LIB
- XPWC95D.LIB replaces XPWC95.LIB
-
- Note: Using these libraries outside the debugging environment will
- cause 3D Studio to crash when invoking the IPAS routine linked with
- the special library.
-
- The batch file (makesamp.bat) provided for building the examples in
- the toolkit will automatically include the special debug library when
- you include the comand line option DEBUG.
-
- Because of the graphic user interface of 3D Studio, we recommend that
- debugging should only be done in a dual screen or remotely hosted
- debugging display. Refer to the debugger documentation for information
- regarding dual screen and remotely hosted debugging.
-
- We also recommend that IPAS routines should only be debugged with 3D
- Studio's Main, Materials, and Rendering display configured for standard
- SVGA. Refer to the "3D Studio Installation Guide" for more information
- concerning display configuration.
-
-
- 5.2 DEBUGGING WITH PHAR LAP 386|DEBUG SYMBOLIC DEBUGGER
- =======================================================
-
- Prior to debugging the IPAS routine, link the routine with the proper
- compiler and linker flags needed by the debugger. In the case of the
- MetaWare 1.73 and 3.0 compilers used in conjunction with Phar Lap's
- 386|LINK linker, the compiler option is "-g" and the linker option is
- "-SYMBOLS".
-
- Start 386|Debug with the following command line:
-
- 386debug -symfile [IPAS] 3ds.exe
-
- In the above example, [IPAS] represents the name of the IPAS routine
- being debugged. The -symfile switch tells 386|DEBUG to use the symbol
- file contained within the [IPAS] executable.
-
- Start 3DS from the 386|DEBUG '-' prompt with the g (go) command. Then
- execute the IPAS routine from within 3DS. When the IPAS routine is
- executed, control will return back to 386|DEBUG prompt along with a
- display of the processor's registers. To get past the INT 3 breakpoint
- and enter the application, use the following command:
-
- r eip eip+1
-
- Use the debugger's xr command to relocate the segment selector values
- so they are relative to the application (rather than to the 3DS
- executable). This command has the form of:
-
- xr oldsel newsel
-
- Where oldsel is the original selector value, and newsel is the new
- value used by the IPAS routine. You can find out what the current
- selector values are by using the debugger's xs command. Once you know
- the current settings, you can replace them with the settings displayed
- in the CS and DS registers. For example, the xs command reveals that
- the CODE selector is C and the DATA selector is 14, and the register
- display shows that CS is now 5C and DS is now 54 for the IPAS routine.
- Use the following commands to change the selectors:
-
- xr C 5C
- xr 14 54
-
- To set a breakpoint in the application, you can use the bp command.
- For example, to set a breakpoint at the beginning of the ClientStartup
- function enter the following:
-
- bp ClientStartup
-
- You can use the g command to reenter the IPAS routine.
-
-
- 5.3 DEBUGGING WITH THE METAWARE DEBUGGER (MDB.EXE)
- ==================================================
-
- Prior to debugging the IPAS routine, link the routine with the proper
- compiler and linker flags needed by the debugger. In the case of the
- MetaWare 1.73 and 3.0 compilers used in conjunction with Phar Lap's
- 386|LINK linker, the compiler option is "-g" and the linker option is
- "-CVSYMBOLS".
-
- Start the debugger with the following command:
-
- mdb
-
- After starting the debugger, load 3D Studio with the following command:
-
- load "3DS.EXE"
-
- You can then start 3DS with the "go" command. When the IPAS routine is
- executed, control will return to the debugger. To skip past the INT 3
- instruction, increment the eip register by 1 using the following
- command:
-
- eip++
-
- Load the symbol information for the IPAS routine with the following
- debugger command:
-
- load "[IPAS]" nocode
-
- In the above example, [IPAS] represents the name of the IPAS routine
- being debugged. The "nocode" option tells the debugger to only load
- the symbol information for the IPAS routine, not the routine itself.
-
- At this point, the location of the source code should be set in the
- debugger's configuration. Various breakpoints and watchpoints can be
- defined as well. For more information regarding this, refer to the
- MetaWare documentation.
-
-
- 5.4 REMOTE DEBUGGING WITH THE METAWARE DEBUGGER
- ===============================================
-
- Prior to debugging the IPAS routine, link the routine with the proper
- compiler and linker flags needed by the debugger. In the case of the
- MetaWare 1.73 and 3.0 compilers used in conjunction with Phar Lap's
- 386|LINK linker, the compiler option is "-g" and the linker option is
- "-CVSYMBOLS".
-
- Before attempting to operate the debugger remotely, please read the
- remote debugging section in the MetaWare documentation. This
- section's intention is to add to that information, not replace it. For
- the sake of clarity, the system used to execute 3D Studio shall be
- referred to as the monitor system, and the system used to execute the
- MetaWare Debugger shall be referred to as the remote system.
-
- The following files, necessary for remote operation, can be found in
- the MetaWare compiler's BIN directory:
-
- MDB.CNF
- MDB.EXE
- MDB.TXT
- MDB.BOD
- MDB.IDX
- MDB1.EXP
- DBGLIB.REX
- MDB.ENV
-
- and in the Phar Lap BIN directory:
-
- RUN386.EXE
-
- Copy these files into a directory on the remote system. The directory
- should be listed in the remote system's PATH setting.
-
- Edit the MDB.ENV text file on the remote system so that it contains the
- correct PORT and BAUD settings to reflect the COM Port and Baud Rate
- being used for remote debugging. Refer to the MetaWare documentation
- for more information about these settings.
-
- The following files, necessary for monitor operation, can be found in
- the MetaWare compiler's BIN directory:
-
- MON.EXP
- DBGLIB.REX
-
- and in the Phar Lap BIN directory:
-
- RUN386.EXE
-
- Copy these files into a directory on the monitor system. The directory
- should be listed in the monitor system's path.
-
- Create a directory on the remote system with the same name as the
- 3D Studio directory located on the monitor system. Into this
- directory, copy the 3DS.EXE program file, the IPAS routine being
- debugged, and the source code to the IPAS routine (if you wish to do
- source level debugging).
-
- Copy to the monitor system the IPAS routine being debugged into the
- directory containing 3D Studio.
-
- Start the monitor program. The command to do this is:
-
- run386 mon [COM #] [SPEED]
-
- Where [COM #] is the number of the COM port, either 1 or 2, and [SPEED]
- is the baud rate. Note that the COM port used on the monitor may or
- may not be the same as the one used on the remote system. Refer to the
- MetaWare documentation for more information regarding the use of the
- monitor program.
-
- On the remote system, continue with the instructions discussed in the
- prior section entitled "Debugging with the MetaWare Debugger (MDB.EXE)"
- beginning with the paragraph "Start the debugger with the following
- command:."
-
- [END]
-