home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20704 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  2.1 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!agate!stanford.edu!apple!goofy!mumbo.apple.com!gallant.apple.com!mtdew.apple.com!alexr
  2. From: alexr@apple.com (Alexander M. Rosenberg)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Proper way to do Self-Modifying code?
  5. Message-ID: <1993Jan5.183337.20064@gallant.apple.com>
  6. Date: 5 Jan 93 18:33:37 GMT
  7. References: <wfFp_jO00WB707kGgq@andrew.cmu.edu>
  8. Sender: news@gallant.apple.com
  9. Organization: Hackers Anonymous
  10. Lines: 26
  11.  
  12. In article <1993Jan4.120353.16699@kth.se> Jon Wltte, d88-jwa@dront.nada.kth.se
  13. writes:
  14. > However, I think you could write the code quite conflict-free
  15. > and as fast using just address-register-relative addressing
  16. > and maybe a data register for rowBytes. Modifying the instructions
  17. > data takes time to do; I think using a register pair would be
  18. > FASTER - and more compatible.
  19.  
  20. Immediate moved bitmaps are _much_ faster than those drawn via table lookups.
  21. This is a technique that they call "Compiled Bitmaps" in rec.games.programmer.
  22. Immediate move instructions are generally faster than using an address
  23. register. It adds up, especially when lots of small bitmaps may be necessary.
  24.  
  25. The one shot compile may even be possible to do at compile time, depending on
  26. the way the screen bitmap is available on the target machine. The problem with
  27. compiled bitmaps is that they typically are double in size over the plan data,
  28. which is why Andy would want to compile them when the game is launched.
  29. Several games take a long time to start up, like Maelstrom (although this is
  30. probably because Maelstrom keeps all it's sprite data as icl8 resources, and
  31. loading, locking, and detaching that many resources takes time).
  32. ---------------------------------------------------------------------------
  33. -  Alexander M. Rosenberg  - INTERNET: alexr@apple.com      - Yoyodyne    -
  34. -  330 Waverley St., Apt B - UUCP:ucbvax!apple!alexr        - Propulsion  -
  35. -  Palo Alto, CA 94301     -                                - Systems     -
  36. -  (415) 329-8463          - Nobody is my employer so       - :-)         -
  37. -  (408) 974-3110          - nobody cares what I say.       -             -
  38.