Subject: Re: [stella] Lord of the Rings optimizations From: "B. Watson" <urchlay@xxxxxxxxxxxxxxxx> Date: Mon, 17 Dec 2001 13:53:34 -0500 (EST) |
On Mon, 17 Dec 2001, Thomas Jentzsch wrote: > Hi, > now, this is something for the hard core coders! (like me :-) > > While disassembling LOTR I found an interesting way of coding. <<snip>> > > So this is another (rather complicated) way for something like: > ldy #value > jsr Subroutine > > But it saves 3 bytes with each call! And the overhead is only 8 bytes, > so after only 3 subroutine calls (LOTR has about 20) you are winning > ROM space! Cool, isn't it? > How horribly abstruse... but, I'm going to count my subroutine calls in Poker Squares and see if I can free up some ROM by er, borrowing this technique. The 8 bytes of overhead aren't even really an issue, since I have a few small chunks of empty ROM at the end of various data tables (where the table is <256 bytes, and the next table must start on a page boundary for timing reasons)... but this may not be worth it, since I don't have any subroutines that take a parameter in a register, so I won't be saving the 2 bytes for the LDY #blah, and I think I only have maybe 3 JSR's in all the code. So I'd only save 3 bytes or so... maybe I won't bother after all. Still, it's an interesting technique. Out of curiosity, has anyone spent more than 5 minutes playing LoTR? I couldn't quite figure out what I was supposed to be doing there... B. ---------------------------------------------------------------------------------------------- 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 -> |
---|---|---|
[stella] Lord of the Rings optimiza, Thomas Jentzsch | Thread | Re: [stella] Lord of the Rings opti, Albert Yarusso - Ata |
[stella] Lord of the Rings optimiza, Thomas Jentzsch | Date | Re: [stella] Re: 2600 availability, MoonlightKnight |
Month |