home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3117 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: www.cybercity.dk!usenet
  2. From: ccc6004@vip.cybercity.dk (Hans Henrik Happe)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: need help on A1200/030 board programming
  5. Date: 12 Feb 1996 22:19:44 GMT
  6. Organization: CyberCity of Denmark
  7. Message-ID: <1100.6616T68T696@vip.cybercity.dk>
  8. References: <4f4hiu$oum@ionews.io.org> <38232327@kone.fipnet.fi><743.6612T966T1128@wr.com.au>
  9.     <4fd491$k8r@sunsystem5.informatik.tu-muenchen.de> <2133.6613T901T923@wr.com.au>
  10. NNTP-Posting-Host: 194.16.56.104
  11. X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
  12.  
  13.  
  14. Accolyte ( accolyte@wr.com.au ) wrote:
  15.  
  16. > :) It's just a shame that you can't rely on the chip-speed. I mean, to 
  17. > make your code compatible with accelerators you can't use 100% of the
  18. > stock 1200's available accesses to chip. I guess you can screw over people
  19. > who have an accelerator without fast, but still there's other situations,
  20. > I'm sure, where the data can't be in fast-ram.
  21.  
  22. This is not that hard... You just have to make a counter that gets updated each
  23. VBlank. This can be done in an interupt like this:
  24.  
  25.     counter = counter + 1
  26.  
  27. Then you can find out how many frames a rutine takes, by saving the current count,
  28. run the rutine, then frames=beforecount - presentcount. Then keep track of how many
  29. frames the slowest state of the rutine has used and se to that no other state will do
  30. it faster.
  31.  
  32. You can also use this counter to sync you calculations. so your - lets say rot&zoom
  33. rutine spins one round in x seconds no matter how fast the computer is.
  34.  
  35. Please do this, I'm sick and tired of bad sync'ed demos... TP5 ring a bell A4000 owners?
  36.  
  37.  
  38. Hans Henrik Happe
  39. Alias Goat / Sumpen
  40.  
  41.