home *** CD-ROM | disk | FTP | other *** search
- 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
- From: alexr@apple.com (Alexander M. Rosenberg)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Proper way to do Self-Modifying code?
- Message-ID: <1993Jan5.183337.20064@gallant.apple.com>
- Date: 5 Jan 93 18:33:37 GMT
- References: <wfFp_jO00WB707kGgq@andrew.cmu.edu>
- Sender: news@gallant.apple.com
- Organization: Hackers Anonymous
- Lines: 26
-
- In article <1993Jan4.120353.16699@kth.se> Jon Wltte, d88-jwa@dront.nada.kth.se
- writes:
- > However, I think you could write the code quite conflict-free
- > and as fast using just address-register-relative addressing
- > and maybe a data register for rowBytes. Modifying the instructions
- > data takes time to do; I think using a register pair would be
- > FASTER - and more compatible.
-
- Immediate moved bitmaps are _much_ faster than those drawn via table lookups.
- This is a technique that they call "Compiled Bitmaps" in rec.games.programmer.
- Immediate move instructions are generally faster than using an address
- register. It adds up, especially when lots of small bitmaps may be necessary.
-
- The one shot compile may even be possible to do at compile time, depending on
- the way the screen bitmap is available on the target machine. The problem with
- compiled bitmaps is that they typically are double in size over the plan data,
- which is why Andy would want to compile them when the game is launched.
- Several games take a long time to start up, like Maelstrom (although this is
- probably because Maelstrom keeps all it's sprite data as icl8 resources, and
- loading, locking, and detaching that many resources takes time).
- ---------------------------------------------------------------------------
- - Alexander M. Rosenberg - INTERNET: alexr@apple.com - Yoyodyne -
- - 330 Waverley St., Apt B - UUCP:ucbvax!apple!alexr - Propulsion -
- - Palo Alto, CA 94301 - - Systems -
- - (415) 329-8463 - Nobody is my employer so - :-) -
- - (408) 974-3110 - nobody cares what I say. - -
-