Subject: Re: [stella] Gunfight 2600 From: "Thomas Jentzsch" <tjentzsch@xxxxxx> Date: Tue, 13 Feb 2001 16:02:08 +0100 |
Manuel Polik wrote:: > Uhm, though it doesn't look too bad, I've already a ...uhm... *little* > problem: [snip] > Now - I can't push the STA WSYNC further down. STA COLUP0 is finished on > cycle 22. Just one cycle more and the colors are ruined. > > So, are there any ideas to speed this up some more? Here are my suggestions: 1. count y down to 0 or -1 (this is my standard answer) If you use a double-line kernel then dey only once per double-line. 2. to determine wether to draw or not use something like this: tya sbc Top ; see 5. adc Height bcc .skipDraw This should save you some time... 3. make all your data reads like (ptr),y and try NOT to use y for anything else. This makes precalculating the ptr variables a bit ;-) more complex and you have to carefully align your data (in fact you have to move the data towards the end of each page), but it saves A LOT of time (did this with Thrust) 4. move branches which take much less time out of the main code (i.E. skipDraw). This eliminates the branches in the slower branch. bxx .fast "lots of cylcles here" .contFast: ... ;--- somewhere near the first branch --- .fast: "only a few cycles here" bxx .contFast ; or jmp if you don't know 5. try to keep the carry-flag always in a defined state (example: use eor, beq instead of cmp, beq) and try to move all necessary sec/clc to the fast branches 6. put a lot of comments in your code, because some of the tricks 1.-5. (especially 3!) will make the code very hard to read :-) Have fun! Thomas _______________________________________________________ Thomas Jentzsch | *** Every bit is sacred ! *** tjentzsch at web dot de | _______________________________________________________________________________ Alles unter einem Dach: Informationen, Fun, E-Mails. Bei WEB.DE: http://web.de Die große Welt der Kommunikation: E-Mail, Fax, SMS, WAP: http://freemail.web.de - Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] Gunfight 2600, Manuel Polik | Thread | [stella] chewing a unicycle, Andrew Davie |
[stella] Qb: Latest version v0.02, Andrew Davie | Date | Re: [stella] Gunfight 2600, Manuel Polik |
Month |