|
Subject: Re: [stella] Death Derby optimizations From: Dennis Debro <ddebro@xxxxxxxxxxxxx> Date: Thu, 15 Jan 2004 15:36:14 -0500 |
Hi Glenn,
> Actually, I am very interested in optimizations. I've been trying to do
> quite a bit since the last build I sent to the list.
Hmmm...just looking at the surface you could move your initialization to a lookup table. This could save you a few bytes. This is if you're flexable in moving your variables around.
I also see some opportunities for some unconditional branches. You could change
.ramp_up_initialize_pitch
LDA #31
sta AUD0_Last_Pitch,X
jmp .ramp_up_register
to
.ramp_up_initialize_pitch
LDA #31
sta AUD0_Last_Pitch,X
bne .ramp_up_register
to save a byte.
You can also change...
.delta_Y_negative
lda #1
sta Overlay1;flag for negative
JMP .continue_Y_Accelerate
.delta_Y_positive
lda #0
sta Overlay1;flag for positive
to
.delta_Y_negative
lda #1
BIT_W ;.byte $2C
.delta_Y_positive
lda #0
sta Overlay1;flag for positive
which will save you 5 bytes.
Also you could remove the jsr's in your mainloop. This could save you 18 bytes and stack RAM. There's really no need to have these even though I know a lot of us use them. I guess you could have them if you don't need the space but if you're fighting for *every* ROM byte I'd get rid of them.
I hope this little bit helped. Taking these suggestions should help a little as there are a number of places this could help. Of course there are more tricks that can be done ;-)
Take care,
Dennis
----------------------------------------------------------------------------------------------
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] Death Derby optimizati, Manuel Rotschkar | Thread | Re: [stella] Death Derby optimizati, Glenn Saunders |
| [stella] Seawolf: Day Eleven, Manuel Rotschkar | Date | Re: [stella] Death Derby optimizati, Glenn Saunders |
| Month |