Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!torag!utdoe!generic!pnet91!ericmcg From: ericmcg@pnet91.cts.com (Eric Mcgillicuddy) Newsgroups: comp.sys.apple2 Subject: Re: Animation (self-modifying code) Message-ID: <661@generic.UUCP> Date: 26 Apr 91 23:30:13 GMT Sender: root@generic.UUCP Organization: People-Net [pnet91], Etobicoke, ON Lines: 26 >slowing you down. That is, if you're using indirect indexing to >load and store bytes to and from the screen, you may wish to change >this to absolute indexing and self-modify the base address for each >new row. The same applies if you're using indirect indexing for >accessing the shape tables. Self-modifying the code is always faster >when dealing with large amounts of data. > ><\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/><\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ >< Philip J. Stephens >< "Many views yield the truth." You do not need to use indirect indexing, absolute indexing from a base of 0000 is more than adequate. setup time is about as long and the data bank register must be the same (althoug I suppose absolute long addressing could be used for the shape table) for the shape table. Using the X register you can access any byte in a given bank and this is currently adequate to support the GS SHR (but throws out my earlier comment about the maintenance in the future). The cost of adjusting the X register for the next line may be as simple as INX or as complex as TXA, CLC,ADC #onerow-size_of_sprite, TAX. Regardless it is less than or equal to self modifying code and more "standard". Eric UUCP: bkj386!pnet91!ericmcg INET: ericmcg@pnet91.cts.com