|
Subject: Re: [stella] Qb: v1.00 (alpha #1) From: Manuel Polik <manuel.polik@xxxxxxxxxxx> Date: Wed, 28 Feb 2001 11:33:15 +0100 |
Hi Andrew!
some little improvements & suggestions:
- Nextlevel -
Replace:
lda level
and #%11111
clc
adc #1
cmp #30
beq Unchange ; maxed out
sta NL_temp
with:
lda level
and #%11111
tax
inx
cpx #30
beq Unchange ; maxed out
stx NL_temp
-- saves 1 byte --
****************************************************************
- Rearrange Owned -
Replace:
Owned ldx CM_CubeIndex
ldy CM_Direction
sec ; fail
rts
with:
Owned sec ; fail
Owned2 ldx CM_CubeIndex
ldy CM_Direction
rts
-- gains nothing, see below --
- Rearrange end of CheckMove -
Replace:
ldy CM_Direction
ldx CM_CubeIndex
with:
jsr Owned2
-- saves another byte! --
****************************************************************
I found something special more often in the kernel:
bcs .MBDraw2 ; 2(3)
nop ; 2
nop ; 2
sec ; 2
bcs .skipMBDraw2 ; 3
It is of course intended for timing here, but:
bcs .MBDraw2 ; 2(3)
nop ; 2
nop ; 2
nop
bcc .skipMBDraw2 ; 3
Might come in handy if you ever want to replace the NOPs here with
something more productive
****************************************************************
All of your AI routines
AIInit
AINormal
AILock
KillPlayer
CorpseInit
CorpseNormal
CorpseDeathwatch
LurkInit
LurkNormal
LurkHatch
FruitInit
FruitNormal
PointsInit
PointsNormal
ShifterInit
ShifterNormal
AITossOff
AIJump
AILand
TwoShoesNormal
HunterNormal
should just fit into one page, you should check that (You can force it
at least by just jumping out of the page in very large one's like
AILock). Now you can change your tables and deal with bytes instead of
words, saving you lot's of data _and_ code!
****************************************************************
You can gain quite a few bytes by rearranging your sprite data here &
there, for example:
Digit1 .byte %00001100 ; **
.byte %00001100 ; **
.byte %00001100 ; **
.byte %00001100 ; **
.byte %00001100 ; **
.byte %00101100 ; * **
.byte %00011100 ; ***
Digit4 .byte %00001100 ; **
.byte %00001100 ; **
.byte %11111110 ; *******
.byte %10001100 ; * **
.byte %01001100 ; * **
.byte %00101100 ; * **
.byte %00011100 ; ***
.byte %00001100 ; **
Another byte saved!
****************************************************************
BeginGame
Replace:
lda #0
ldx #2
ClScore sta PlayerScore,x ; score = 0
dex
bpl ClScore
with:
lda #$00
sta playereScore
sta playrescore+1
sta playrescore+2
Another byte saved!
****************************************************************
Uh... Oh... feeling dizzy now
Hope it helps a bit (byte :-))
Greetings,
Manuel
-
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] Qb: v1.00 (alpha #1), Andrew Davie | Thread | Re: [stella] Qb: v1.00 (alpha #1), Glenn Saunders |
| Re: [stella] Qb: v1.00 (alpha #1), Glenn Saunders | Date | Re: [stella] Gunfight 2600: The Goo, Manuel Polik |
| Month |