home *** CD-ROM | disk | FTP | other *** search
/ CD-X 1 / cdx_01.iso / demodisc / basq / source / poweru / pwrfunc.doc < prev    next >
Encoding:
Text File  |  1993-08-19  |  11.2 KB  |  446 lines

  1. Power Utilities v1.0 by Psycho (C) '93
  2.  
  3. This file are in the packet:
  4.     -DCOMP.EXE    Compresser for digitized files.It's better than ARJ!
  5.              But is only a BETA version.So,for this is not too
  6.              good,because is not use storing,etc.)
  7.     -DTRACE.COM    A little TSR for sight the disk operations.
  8.              Thanks to DADA for idea.
  9.     -LINKPLUS.EXE    Linking a data file to the EXE file.
  10.              Is not linking in overlay mode.
  11.     -MAKE-OV.EXE    Creating a overlay file.
  12.              Using this file see below.
  13.     -PCX2BMP.EXE    A Simple pcx converter.It's fast,but awesome....
  14.     -PICUT.EXE    see PCX2BMP,but this cutting the empty territory.
  15.     -PWRFUNC.OBJ    Power Functions v1.0 object file.
  16.     -PWRFUNC.INC    Power Functions v1.0 include file.
  17.     -PWRFUNC.DOC    This file.
  18.  
  19. ------------------------------------------------------------------------------
  20.  
  21. What is DCOMP.EXE?
  22.  
  23. A high ratio crucher for digitized files.
  24. But after decompressing will be a little quality detoration,because this not
  25.  using sinus interpolling.So,it's a beta version,and for this very lame.
  26. And,how is why on this packet.Make a trial!
  27. Compress with this a high samplerating file.And sight the compressed filesize.
  28. It's better than ARJ,but this just a BETA version.
  29.  
  30. ------------------------------------------------------------------------------
  31.  
  32. How to use MAKE-OV(TM)?
  33.  
  34. First:    Create a MAKE-OV.CFG file,with this structure:
  35.         -Base file        Example:TEST.EXE
  36.         -Item,Item ID        Example:ITEM.DAT,1
  37. Second:    Make a base file(compiling,linking,etc.)
  38. three:    Run MAKE-OV.EXE
  39.         Example:    MAKE-OV.EXE
  40.                 MAKE-OV.EXE OTHER.CFG
  41.     You can use a config file with other filename like MAKE-OV.CFG.
  42. Four:    Use Power Functions(TM).Seealso:-OPENOVERLAY
  43.                     -LOADOVERLAYITEM
  44.                     -WRITOVERLAYITEM
  45.                     -CLOSEOVERLAY
  46.  
  47. In the near future the MAKE-OV(TM) will using a high ratio crucher.Maybe...
  48.  
  49. ------------------------------------------------------------------------------
  50.  
  51. Now let's see the Power Functions(TM).
  52. Maked for MS-DOS and 386 or better processor.
  53. The functions working only REAL and V86 mode.The coming versions will be
  54.  working on PROTECTED mode.I hope...
  55. Sorry for,how the functions supported only assembly calling.
  56.  
  57. Funtions are listed:
  58.     -EXIT
  59.     -FATALEXIT
  60.     -OPENOVERLAY        (This overlay handler a very cool subroutine)
  61.     -CLOSEOVERLAY
  62.     -LOADOVERLAYITEM
  63.     -WRITOVERLAYITEM    (For config saving)
  64.     -TIMINGON
  65.     -TIMINGOFF
  66.     -SETTIMFUNCON
  67.     -SETTIMFUNCOFF
  68.     -RESETCOLORS
  69.     -SETCOLORS
  70.     -FADEUPCOLORS
  71.     -FADEDWCOLORS
  72.     -RTIMEON
  73.     -RTIMEOFF
  74.     -WAITVERTRETRACE
  75.     -SETFCMODE
  76.     -SET240MODE
  77.     -TURNOFFFCMODE
  78.     -PUTPOLY320        (It's very fast!)
  79.     -PUTOBJ320CONV
  80.     -ROTATEPOINTS        (Great!!!)
  81.     -ROTATEOBJECT        (too is)
  82.     -RANDOM
  83.     -TEST386
  84.     -CHECKMEMORY
  85.  
  86. ------------------------------------------------------------------------------
  87.  
  88. EXIT:
  89.  
  90.     in:    -
  91.     out:    -
  92.  
  93.     Comment: Aborting from actual program with 4Ch func of DOS.
  94.  
  95. ------------------------------------------------------------------------------
  96.  
  97. FATALEXIT:
  98.     in:    -
  99.     out:    -
  100.  
  101.     Comment: Seealso EXIT,but this before exiting change the video mode
  102.          to 03h.
  103.  
  104. ------------------------------------------------------------------------------
  105.  
  106. OPENOVERLAY:
  107.  
  108.     in:    -
  109.     out:    CF set if error
  110.  
  111.     Comment: Open the overlay module was linked to EXE file.
  112.          Seealso: 'How to use MAKE-OV(TM)?'
  113.  
  114. ------------------------------------------------------------------------------
  115.  
  116. CLOSEOVERLAY:
  117.  
  118.     in:    -
  119.     out:    CF set if error
  120.  
  121.     Comment: Closing the overlay module.This functions releasing the
  122.          dos handle.Use at end of program.
  123.  
  124. ------------------------------------------------------------------------------
  125.  
  126. LOADOVERLAYITEM:
  127.  
  128.     in:    AX = Segment address where to will load the item.
  129.         BX = Overlay item ID
  130.     out:    CF set if error.
  131.  
  132.     Comment: Load a overlay item to memory.
  133.  
  134. ------------------------------------------------------------------------------
  135.  
  136. WRITOVERLAYITEM:
  137.  
  138.     in:    AX = Segment address of memory from where writing to
  139.               overlay item.
  140.         BX = Overlay item ID
  141.         ECX = Number of bytes to write.
  142.     out:    CF set if error
  143.  
  144.     Comment: Writing the memory to overlay module.
  145.  
  146. ------------------------------------------------------------------------------
  147.  
  148. TIMINGON:
  149.  
  150.     in:    -
  151.     out:    -
  152.  
  153.     Comment: Installing the new interrupt routine to int 08h.
  154.          The new interrupt will be call seventytwo times per seconds,
  155.          but the system clock will be not standstill.
  156.  
  157. ------------------------------------------------------------------------------
  158.  
  159. TIMINGOFF:
  160.  
  161.     in:    -
  162.     out:    -
  163.  
  164.     Comment: Remove the interrupt handler from int 08h.
  165.  
  166. ------------------------------------------------------------------------------
  167.  
  168. SETTIMFUNCON:
  169.  
  170.     in:    AX = Number of Function (0 to 15)
  171.         SI = offset address of function
  172.         CX = how many 1/72 seconds will be calling the function.
  173.     out:    -
  174.  
  175.     Comment: Turn on a timing function.
  176.  
  177. ------------------------------------------------------------------------------
  178.  
  179. SETTIMFUNCOFF:
  180.  
  181.     in:    -
  182.     out:    -
  183.  
  184.     Comment: Turn off a timing function.
  185.  
  186. ------------------------------------------------------------------------------
  187.  
  188. RESETCOLORS:
  189.  
  190.     in:    -
  191.     out:    -
  192.  
  193.     Comment: Fill the color table and the color registers with zero.
  194.  
  195. ------------------------------------------------------------------------------
  196.  
  197. SETCOLORS:
  198.  
  199.     in:    AX = Segment address of color table
  200.         SI = Offset address of color table
  201.     out:    -
  202.  
  203.     Comment: Set the color table and registers with the new value.
  204.           The color table is a very simple array.
  205.  
  206.             Color 0:Red value    (byte)
  207.                 Green value    (byte)
  208.                 Blue value    (byte)
  209.             ...
  210.             ...
  211.             Color 9:Red value
  212.                 Green value
  213.                 Blue value
  214.  
  215. ------------------------------------------------------------------------------
  216.  
  217. FADEUPCOLORS:
  218.  
  219.     in:    AX = Segment address of color table
  220.         SI = Offset address of color table
  221.     out:    -
  222.  
  223.     Comment: Change the present colors by one step arranged to color
  224.           table.
  225.  
  226. ------------------------------------------------------------------------------
  227.  
  228. FADEDWCOLORS:
  229.  
  230.     in:    -
  231.     out:    -
  232.  
  233.     Comment: Fading down the present colors by one step.
  234.  
  235. ------------------------------------------------------------------------------
  236.  
  237. RTIMEON:
  238.  
  239.     in:    -
  240.     out:    -
  241.  
  242.     Comment: Set 0th color register to white.
  243.  
  244. ------------------------------------------------------------------------------
  245.  
  246. RTIMEOFF:
  247.  
  248.     in:    -
  249.     out:    -
  250.  
  251.     Comment: Set 0th color register to black.
  252.  
  253. ------------------------------------------------------------------------------
  254.  
  255. WAITVERTRETRACE:
  256.  
  257.     in:    -
  258.     out:    -
  259.  
  260.     Comment: Waiting to vertical retrace.
  261.  
  262. ------------------------------------------------------------------------------
  263.  
  264. SETFCMODE:
  265.  
  266.     in:    -
  267.     out:    -
  268.  
  269.     Comment: Set the video card to eight bitplane mode.This mode called
  270.           to Four-Chain mode.
  271.  
  272. ------------------------------------------------------------------------------
  273.  
  274. SET240MODE:
  275.  
  276.     in:    -
  277.     out:    -
  278.  
  279.     Comment: Set the screen mode 320x240-256 bitplane mode.
  280.  
  281. ------------------------------------------------------------------------------
  282.  
  283. TRUNOFFFCMODE:
  284.  
  285.     in:    -
  286.     out:    -
  287.  
  288.     Comment: Turning off the Four-Chain mode.
  289.  
  290. ------------------------------------------------------------------------------
  291.  
  292. PUTPOLY320:
  293.  
  294.     in:    V1_X = X coord of Vertex #1        (word)
  295.         V1_Y = Y coord of Vertex #1        (word)
  296.         V2_X = X coord of Vertex #2        (word)
  297.         V2_Y = Y coord of Vertex #2        (word)
  298.         V3_X = X coord of Vertex #3        (word)
  299.         V3_Y = Y coord of Vertex #3        (word)
  300.         POLYCOLOR = color of triangle        (word)
  301.     out:    !MIN_OFFSET = lower offset in memory    (word)
  302.         !MAX_OFFSET = higher offset in memory    (word)
  303.  
  304.     Comment: Drawing a triangle to memory with ES:0h begining.
  305.  
  306. ------------------------------------------------------------------------------
  307.  
  308. PUTOBJ320CONV:
  309.  
  310.     in:    AX = Segment address of object
  311.         SI = Offset address of object
  312.         And preseted the ORIGO_X,ORIGO_Y,ORIGO_Z.
  313.     out:    -
  314.  
  315.     Comment: This functions drawing a complete convex object to memory
  316.           with ES:0h begining.Object format see below:
  317.  
  318.          Offset 0:    Numbers of triangle        (word)
  319.          Offset 2:    Triangle 1            (four word)
  320.                 Color of polygon    (word)
  321.                 Vertex #1 number    (word)
  322.                 Vertex #2 number    (word)
  323.                 Vertex #3 number    (word)
  324.          ...
  325.          ...
  326.          The Vertex table begining at offset0*8+4
  327.          Offset x:    Vertex #1            (six word)
  328.                 X coord            (word)
  329.                 Y coord            (word)
  330.                 Z coord            (word)
  331.          offset x+6:    Vertex #2
  332.          ...
  333.          ...
  334.  
  335. ------------------------------------------------------------------------------
  336.  
  337. ROTATEOBJECT:
  338.  
  339.     in:    AX = Segment address of source object
  340.         BX = Segment address of destination object
  341.         SI = Offset address of source object
  342.         DI = Offset address of destination object
  343.         And the angles of axis preseted with SETROTATEANGLE and
  344.          ADDROTATEANGLE
  345.     out:    -
  346.  
  347.     Comment: Rotate an object.The object format seealso PUTOBJ320CONV
  348.  
  349. ------------------------------------------------------------------------------
  350.  
  351. SETROTATEANGLE:
  352.  
  353.     in:    AX = new angle of x axis (half degrees)
  354.         BX = new angle of y axis (half degrees)
  355.         CX = new angle of z axis (half degrees)
  356.     out:    -
  357.  
  358.     Comment: Sets with the new value the coords angles.
  359.  
  360. ------------------------------------------------------------------------------
  361.  
  362. ADDROTATEANGLE:
  363.  
  364.     in:    Seealso SETROTATEANGLE
  365.     out:    -
  366.  
  367.     Comment: Additing the angles for the actual values.
  368.  
  369. ------------------------------------------------------------------------------
  370.  
  371. ROTATEPOINTS:
  372.  
  373.     in:    AX = Segment address of source table
  374.         BX = Segment address of destination table
  375.         SI = Offset address of source table
  376.         DI = Offset address of destination table
  377.         CX = Number of points
  378.     out:    -
  379.  
  380.     Comment: Rotating a coords table.It's very fast,and working in five
  381.           digit precision.
  382.  
  383.         Points table is very simple:
  384.  
  385.             offset 0:    Point 1 X coord    (word)
  386.             offset 2:    Point 1 Y coord (word)
  387.             offset 4:    Point 1 Z coord (word)
  388.             offset 6:    point 2 X coord (word)
  389.             ...
  390.             ...
  391.  
  392. ------------------------------------------------------------------------------
  393.  
  394. RANDOM:
  395.  
  396.     in:    RNDMAX = Maximal random value        (word)
  397.     out:    AX = Random number
  398.  
  399.     Comment: Get a random number.
  400.  
  401. ------------------------------------------------------------------------------
  402.  
  403. TEST386:
  404.  
  405.     in:    -
  406.     out:    -
  407.  
  408.     Comment: Test the main processor type and aborting from program
  409.           if not 386 or better.
  410.  
  411. ------------------------------------------------------------------------------
  412.  
  413. CHECKMEMORY:
  414.  
  415.     in:    AX = Required memory in Kb
  416.     out:    CF set if not enough memory
  417.  
  418.     Comment: Checking avaible conventional memory.
  419.  
  420. ------------------------------------------------------------------------------
  421.  
  422. Public data members:
  423.  
  424.     OILENGTH:    (dword) Length of overlay item in bytes (loaded)
  425.     RNDMAX:        (word) Maximal random value
  426.     V1_X:        (word) Vertex #1 X coord
  427.     V1_Y:        (word) Vertex #1 Y coord
  428.     V2_X:        (word) Vertex #2 X coord
  429.     V2_Y:        (word) Vertex #2 Y coord
  430.     V3_X:        (word) Vertex #3 X coord
  431.     V3_Y:        (word) Vertex #3 Y coord
  432.     POLYCOLOR:    (byte) color of triangle
  433.     EYEDISTANCE:    (word) Eyedistance
  434.     ORIGO_X:    (word) origo of X axis
  435.     ORIGO_Y:    (word) origo of Y axis
  436.     ORIGO_Z:    (word) origo of Z axis
  437.     MIN_OFFSET:    (word) after triangle drawing the lower offset
  438.     MAX_OFFSET:    (word) after triangle drawing the higher offset
  439.  
  440. ------------------------------------------------------------------------------
  441.  
  442. The Power Functions coded in assembly,the other utilities programmed
  443.  in Borland C++ v3.1.
  444.  
  445. Sorry for BAD english!
  446.