home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 25 / amigaformatcd25.iso / websites / f1_gp / utils / agpperf.doc < prev    next >
Text File  |  1998-02-12  |  9KB  |  257 lines

  1.                                ---------------
  2.                                 AGPPerf V0.5h
  3.                              -------------------
  4.  
  5.                          Public Release Beta Version
  6.  
  7.                                 3 October 1995
  8.  
  9.                                 by Grant Reeve
  10.                            reeve1@cs.waikato.ac.nz
  11.  
  12.  
  13. ABOUT THIS VERSION
  14. ------------------
  15.  
  16. I finally got sick of not releasing this software, and people keep asking for
  17. copies to play with, so I decided to release the current version I am up to in
  18. development, to let everyone be happy.  When my exams and other uni stuff
  19. finish soon, I will then be able to sit down and produce a nice proper full
  20. release version.  This full version will be shareware (probably about 5 UKP
  21. registration), but completely uncrippled for those of you who can't part with
  22. any of your precious money :)
  23.  
  24.  
  25. OVERVIEW
  26. --------
  27.  
  28. This program is based fairly loosely on the PC version of GPPerf.
  29.  
  30. It records telemetry of your F1 car as you drive around the track in F1GP, and
  31. allows you to then save it to disk for viewing with some other displaying
  32. utility (ie: GPDisplay)
  33.  
  34. It also puts some cute extra little thingies on the dashboard.
  35.  
  36.  
  37. INFO
  38. ----
  39.  
  40. How is the info formatted?
  41.  
  42. Well, F1GP stores the track as a list of segments. These segments are
  43. approximately 16 feet, or 5 meters, apart. AGPPerf records info about the car
  44. as it crosses the start line of the current segment the car is on. These
  45. segments are numbered from 0 (the start line) to N, where N is the maximum
  46. segment for a track. Pit segments are numbered differently, but AGPPerf
  47. doesn't record pit segments, so that doesn't matter. A .perf file of 1 lap
  48. will contain N+2 segments: 0 to N, plus another 0 segment to finish the lap
  49. off. The first 0 segment of a recording will have a time of 0:00.000, and
  50. subsequent 0 segments will contain the lap time of the lap just driven.
  51.  
  52. How many segments are there?
  53.  
  54. This depends on the track. Here is a table, containing the highest segment
  55. number for a track (ie: the segment number of the segment before the start
  56. line)
  57.  
  58.      Circuit                       #    Segments
  59.      --------------------------------------------
  60.      Phoenix - United States       00    767
  61.      Interlagos - Brazil           01    887
  62.      Imola - San Marino            02   1032
  63.      Monte-Carlo - Monaco          03    699
  64.      Montreal - Canada             04    913
  65.      Mexico City - Mexico          05    904
  66.      Magny Cours - France          06    875
  67.      Silverstone - Great Britain   07   1056
  68.      Hockenheim - Germany          08   1395
  69.      Hungaroring - Hungary         09    813
  70.      Spa-Francorchamps - Belgium   10   1416
  71.      Monza - Italy                 11   1188
  72.      Estoril - Portugal            12    891
  73.      Barcelona - Spain             13    972
  74.      Suzuka - Japan                14   1202
  75.      Adelaide - Australia          15    803
  76.  
  77. What information does AGPPerf save?
  78.  
  79. First, there is the file header:
  80.  
  81. typedef struct {
  82.    UBYTE version;          // .perf file version (0)
  83.    UBYTE revision;         // .perf file revision (2)
  84.    UBYTE circuit;          // the track being driven (0-15)
  85.    UBYTE car_number;       // the number of the car being recorded (1-40)
  86.    UBYTE front_wings;      // front wing setting
  87.    UBYTE rear_wings;       // rear wing setting
  88.    UBYTE tyre_compound;    // tyre compound being driven (0=A..3=D, 4=Q, 5=W)
  89.    BYTE brake_balance;     // brake balance
  90.    UBYTE gears[6];         // the gear ratios
  91.    UWORD hp;               // horse power ($4000=716 HP)
  92.    ULONG ent_number;       // number of PERF entries saved in file
  93.    UWORD ent_size;         // size of a PERF entry
  94. } PERF_HEADER;
  95.  
  96. Then one of these PERF entries is saved for every track segment that
  97. is crossed:
  98.  
  99. typedef struct {
  100.     UWORD track_segment_id; // segment id of the bit of track crossed
  101.     ULONG time;             // time (in milliseconds) at the start of the seg
  102.     UWORD revs;             // revs
  103.     UWORD speed;            // speed, ($40 = 1 foot/s)
  104.     UBYTE gear;             // gear (1-6, 0=Neutral, -1=Reverse, 7=Spin)
  105.     UBYTE user_input;       // bit 0=forward, 1=back, 2=left, 3=right
  106.     WORD  angle;            // angle the car is facing (0=0 deg, $8000=180 deg)
  107.     LONG  car_x_pos;        // x position of the car
  108.     LONG  car_y_pos;        // y position of the car
  109. } PERF;
  110.  
  111.  
  112. USAGE
  113. -----
  114.  
  115. First, make sure that the f1gp.library file is in LIBS:.
  116.  
  117. Then, run F1GP, then AGPPerf with the following template:
  118.  
  119. AGPPerf [outputfilename] [quiet] [datamem <size>] [winpos <x> <y>]
  120.    [surflight] [fullbar] [redcross]
  121.  
  122. outputfilename
  123.   This is the name to save the output file to. Default is "out.perf". Since a
  124. filerequester is used to save with, this is not important, unless AGPPerf
  125. can't open the ASL library.
  126.  
  127. quiet
  128.   This tells AGPPerf not to print anything to stdout.
  129.  
  130. datamem <size>
  131.   This tells AGPPerf how much memory to allocate for recording data to, in KB.
  132. Default is 32K. The longest track (Belgium) needs 31218 bytes to save a lap.
  133.  
  134. winpos <x> <y>
  135.   This tells AGPPerf where to put it's window on startup. Positive values will
  136. offset the top left corner from the top left of the screen. Negative values
  137. will offset the bottom right corner from the bottom right of the screen.
  138. ie: winpos -1 0 will put the window in the top right corner.
  139.  
  140. surflight
  141.   This turns the surface lights off. 
  142.  
  143. fullbar
  144.   This turns the full bar off.
  145.  
  146. redcross
  147.   This stops AGPPerf from setting the red cross in the pitlight square.
  148.  
  149.  
  150. KEYS
  151. ----
  152.  
  153. Keys that work in the AGPPerf window:
  154.  
  155. esc - quit
  156.   This quits
  157.  
  158. s - save as
  159.   This brings up an ASL file requestor, if the ASL library is there, to ask
  160. you where to save the current perf. If ASL isn't there, it will just save to
  161. the default file name, or the name supplied on the command line.
  162.  
  163. Once you are in the cockpit, you can use the following keys:
  164.  
  165. F10 - Stop
  166.   This stops any recording.
  167.  
  168. F9 - Start
  169.   This clears the buffer, then starts recording immediately.
  170.  
  171. F8 - Autostart
  172.   This clears the buffer, then waits until you next cross the start/finish
  173. line, then starts recording from there. This is the key I usually use.
  174.  
  175. If you have done a particularly cool lap, and want to save it, you just pause
  176. the game, press escape, then using left amiga-m, go back to workbench and save
  177. it, or use GPDisplay to grab it from memory.
  178.  
  179.  
  180. NEW DASHBOARD DISPLAY
  181. ---------------------
  182.  
  183. AGPPerf uses the "lights" on the left hand side of the dashboard to indicate
  184. it's current state. The old use of these lights, indicating the opposition
  185. driver skill level, has been replaced. Also, the red cross pit light is used
  186. too.
  187.  
  188.  (surface lights)      Lights
  189.        outside wheel =  O   O = status of AGPPerf
  190.         inside wheel = O   O
  191.                      _    O
  192.                     //   O
  193.         full bar = //   O
  194.                    -
  195.  
  196. status of AGPPerf:
  197.  This light has the following meanings:
  198.  grey  = not recording, and buffer is empty
  199.  white = not recording, but something is in the buffer
  200.  red   = recording has stopped, and the buffer is full
  201.  green = recording
  202.  blue  = autostart mode
  203.  
  204. outside/inside wheels (surface lights):
  205.  These lights indicate the surface that the outside/inside wheels of the car
  206. is on.
  207.  grey   = road
  208.  white  = low curb
  209.  yellow = high curb
  210.  red    = grass (naughty!)
  211.  
  212. full bar:
  213.  This bar shows how full the AGPPerf record buffer is.
  214.  
  215. Red cross pit light:
  216.  This will come on if you touch the grass at any time. This light is a good
  217. indicator that you have done a naughty lap. It will get cleared when you cross
  218. the line.
  219.  
  220.  
  221. DISCLAIMER
  222. ----------
  223.  
  224. I hereby disclaim any responsibility if AGPPerf crashes, or formats your
  225. harddrive, eats up your pet bird, causes the extinction of mankind, etc. etc.
  226.  
  227.  
  228. BUGS
  229. ----
  230.  
  231. There is a bug, that AGPPerf will show it's dashboard stuff all the time, even
  232. if you are outside the cockpit, or in another car.
  233.  
  234. If at some point a small window randomly appears with a flashing message
  235. saying "Ha ha! I am a bug from AGPPerf!" then you have a different version to
  236. mine and could you please send it to me.
  237.  
  238. If you find a bug (in AGPPerf), then tell me. I will then make an attempt to
  239. try to fix it, if I'm not too busy elsewhere.
  240.  
  241.  
  242. OTHER STUFF
  243. -----------
  244.  
  245. This program uses Oliver Roberts' f1gp.library (c) 1995.
  246.  
  247. I wish to thank the following people, for giving me ideas and info and stuff:
  248. Rene Smit, Trevor Kellaway, Oliver Roberts, Edo Nijmeijer, Rob Buis.
  249.  
  250.  
  251. FINAL COMMENT
  252. -------------
  253.  
  254. You WILL find this program useful. If not, then I will beat you up. :)
  255.  
  256.  
  257.