git.shiar.nl
/
wormy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1ef9903
)
worm 0.89.0426: further memory usage analysis/tweaking
author
Mischa Poslawsky
<wormy@shiar.org>
Wed, 26 Apr 2000 11:34:54 +0000
(13:34 +0200)
committer
Mischa Poslawsky
<wormy@shiar.org>
Sun, 22 Feb 2009 15:13:37 +0000
(16:13 +0100)
worm.z80
patch
|
blob
|
history
wormlvl.z80
patch
|
blob
|
history
diff --git
a/worm.z80
b/worm.z80
index d5b88d118fd333243bd3847e680083471f60ded9..2db4d9cdfa04d2bc8eb5628cb6c67cd8f150d3e4 100644
(file)
--- a/
worm.z80
+++ b/
worm.z80
@@
-76,26
+76,33
@@
_writeb_inc_ahl = $5567 ;ld (ahl),c
;------- data storage -------
;-----------------------------
;------- data storage -------
;-----------------------------
-leveldata = $EA00 ;size< $400
-ScrBuffer = $8100 ;size=$2000 (32x256)
- ;->mod$800
-templevels = $BC00 ;size= 3*$10
-DispBuffer = $BC00 ;size= $390 (16x57)
-SinCosTable = $B500 ;size= $100 (4x64)
-
-worm1 = $B400
-worm2 = $B41E
-worm3 = $B43C
-worm4 = $B45A
-ball1 = $B478
-
-resbit = 2 ;and%11111011
-worm1p = $B000 ;%10110000 -$B3FF
-worm2p = $B800 ;%10111000 -$BBFF
-worm3p = $F000 ;%11110000 -$F3FF
-worm4p = $A800 ;$E800=%11101000 ;$D748+$1000+
-
-WormVersion = 088
+;--- permanent
+
+resbit = 2 ;and%111110**
+
+ScrBuffer = $8820 ;-A7FF (20*FF=1FE0)
+worm1p = $A800 ;-ABFF (400) %10101O00
+worm1 = $AC00 ;-AC1D (30d)
+worm2 = $AC1E ;-AC3B (1E)
+worm3 = $AC3C ;-AC59 (1E)
+worm4 = $AC5A ;-AC77 (1E)
+balls = $AC78 ;-ACFF (3x45d)
+SinCosTable = $AD00 ;-AE00 (4x40)
+ ;free $AE01 ;-AFFF (1FF)
+worm2p = $B000 ;-B3FF (400) %10110O00
+DispBuffer = $B400 ;-B790 (10x57d)
+ ;free $B791 ;-B7FF (6F)
+worm3p = $B800 ;-BBFF (400) %10111O00
+ ;free $BC00 ;-BFFF (400)
+
+ ;program $D748 ;-E7FF (106D+4A)
+ ;free $E800 ;-EFFF (800)
+worm4p = $F000 ;-F3FF (400) %11110O00
+leveldata = $F400 ;-FA70 (<=671)
+
+;--- temporary
+
+templevels = $B400 ;(3*levelstr_on_calc)
;-----------------------------
;------- program start -------
;-----------------------------
;------- program start -------
@@
-103,6
+110,8
@@
WormVersion = 088
.org _asm_exec_ram
.org _asm_exec_ram
+WormVersion = 089
+
start:
nop
jp Start
start:
nop
jp Start
@@
-124,8
+133,8
@@
WormIcon:
.db %11101111,%00001111
.db %11000011,%10000000
.db %11101111,%00001111
.db %11000011,%10000000
-levelhead = '
8
'
-levelhead2 =
'9'
;worm levels header = "89"
+levelhead = '
w
'
+levelhead2 =
89
;worm levels header = "89"
Start:
ld (SpSave),sp
Start:
ld (SpSave),sp
@@
-137,7
+146,7
@@
Start:
ld hl,$BFFF ;VAT start
ld bc,templevels
searchloop:
ld hl,$BFFF ;VAT start
ld bc,templevels
searchloop:
- ld de,(_PTEMP_END+1)
+ ld de,(_PTEMP_END+1)
;VAT end
or a ;nc
sbc hl,de ;hl<de?
jr c,searchcomplete
or a ;nc
sbc hl,de ;hl<de?
jr c,searchcomplete
@@
-147,6
+156,7
@@
searchloop:
cp $0C ;string
jr z,stringfound
searchnext:
cp $0C ;string
jr z,stringfound
searchnext:
+ cal _RAM_PAGE_7
pop hl
dec hl ;5x
dec hl
pop hl
dec hl ;5x
dec hl
@@
-188,7
+198,6
@@
stringfound:
ld a,l
ld (bc),a
inc bc
ld a,l
ld (bc),a
inc bc
- cal _RAM_PAGE_7
jr searchnext
loadgametype:
jr searchnext
loadgametype:
@@
-496,12
+505,17
@@
menudraw:
changeworms:
cal _clrWindow
changeworms:
cal _clrWindow
+ ld hl,txtName
+ cal _puts ;"Enter name player "
ld a,(Gametype)
cp 2
ld a,1
jr c,wormnrname
ld a,(nrworms)
wormnrname:
ld a,(Gametype)
cp 2
ld a,1
jr c,wormnrname
ld a,(nrworms)
wormnrname:
+ add a,'0'
+ cal _putc
+ sub '0'
add a,a ;2x
ld e,a
add a,a ;4x
add a,a ;2x
ld e,a
add a,a ;4x
@@
-518,6
+532,9
@@
wormnrname:
jp DisplayMenu
entername:
jp DisplayMenu
entername:
+ ld h,1
+ ld l,h
+ ld (_curRow),hl
ld (namelength),a
enternameloop:
ld a,'_'
ld (namelength),a
enternameloop:
ld a,'_'
@@
-581,13
+598,13
@@
waitnokeypressed:
namelength:
.db 0
chartable:
namelength:
.db 0
chartable:
- .db 0,"
!<>^
",0,0,0,0
+ .db 0,"
.<>!
",0,0,0,0
.db 0,"xtoje0",0 ;enter..clear
.db " wsnid9",0 ;(-)..custom
.db "zvrmhc8",0 ;dot..del
.db 0,"xtoje0",0 ;enter..clear
.db " wsnid9",0 ;(-)..custom
.db "zvrmhc8",0 ;dot..del
- .db "yuqlgb7
*
" ;0..xvar
+ .db "yuqlgb7
#
" ;0..xvar
.db 0,"-pkfa6'" ;on..alpha
.db 0,"-pkfa6'" ;on..alpha
- .db "54321
.
",0,0 ;F5..more
+ .db "54321
*
",0,0 ;F5..more
;--proc
;--proc
@@
-811,7
+828,7
@@
setsprite:
add a,c
ld c,a
ld b,0
add a,c
ld c,a
ld b,0
- ld de,ball
1
+ ld de,ball
s
ldir
toobad_noballs:
ldir
toobad_noballs:
@@
-1112,8
+1129,7
@@
CheckExit:
WormDead:
ld a,2
ld (flashtime),a
WormDead:
ld a,2
ld (flashtime),a
- ld a,respawndelay
- ld (ix+delay),a
+ ld (ix+delay),respawndelay
thislevel =$+1
ld de,0
thislevel =$+1
ld de,0
@@
-1314,7
+1330,7
@@
hiscrposa =$-1
ld hl,0
hiscrposhl =$-2
ret z ;(Gametype)=0
ld hl,0
hiscrposhl =$-2
ret z ;(Gametype)=0
- cal _
INC_PTR_AHL
+ cal _
AHL_PLUS_2_PG3
ret
;-----------------------------
ret
;-----------------------------
@@
-1678,7
+1694,7
@@
nrballs =$-1
or a
ret z
or a
ret z
- ld hl,ball
1
+ ld hl,ball
s
ld b,a
handleballs
psh bc
ld b,a
handleballs
psh bc
@@
-2583,17
+2599,6
@@
LevelDefM:
;---------- data -------------
;-----------------------------
;---------- data -------------
;-----------------------------
-TrigPrecalc:
-.db 0, 3, 6, 9, 12, 15, 18, 21
-.db 24, 27, 30, 33, 36, 39, 42, 45
-.db 48, 51, 54, 57, 59, 62, 65, 67
-.db 70, 73, 75, 78, 80, 82, 85, 87
-.db 89, 91, 94, 96, 98,100,102,103
-.db 105,107,108,110,112,113,114,116
-.db 117,118,119,120,121,122,123,123
-.db 124,125,125,126,126,126,126,126
-.db 127
-
txtWelcome: .db "Welcome to Worm!! ",
.db "by Shiar",0
.db "Have fun!",0 ;4th menu item
txtWelcome: .db "Welcome to Worm!! ",
.db "by Shiar",0
.db "Have fun!",0 ;4th menu item
@@
-2608,8
+2613,20
@@
txtGame2: .db "Peaworm ",0 ;1
.db "Race ",0 ;6
.db "CTF ",0 ;7
.db "Domination",0 ;(>=8)
.db "Race ",0 ;6
.db "CTF ",0 ;7
.db "Domination",0 ;(>=8)
+txtName: .db "Enter name player ",0
txtWaiting: .db "Waiting...",0
txtWaiting: .db "Waiting...",0
-txtReceive: .db "Receiving...",0
+txtReceive: .db "Receiving..." ;,0
+
+TrigPrecalc:
+.db 0, 3, 6, 9, 12, 15, 18, 21
+.db 24, 27, 30, 33, 36, 39, 42, 45
+.db 48, 51, 54, 57, 59, 62, 65, 67
+.db 70, 73, 75, 78, 80, 82, 85, 87
+.db 89, 91, 94, 96, 98,100,102,103
+.db 105,107,108,110,112,113,114,116
+.db 117,118,119,120,121,122,123,123
+.db 124,125,125,126,126,126,126,126
+.db 127
txtLevel: .db "Level ",0
txtWorms: .db "Worms: 0",0 ;follows txtLevel
txtLevel: .db "Level ",0
txtWorms: .db "Worms: 0",0 ;follows txtLevel
@@
-2646,20
+2663,20
@@
datalevels: .dw LevelDef, LevelDef
.dw LevelDefM,LevelDefM
.dw LevelDefM,LevelDefM
.dw LevelDefM,LevelDefM
.dw LevelDefM,LevelDefM
.dw LevelDefM,LevelDefM
.dw LevelDefM,LevelDefM
-nrlevels: .db
1,1,1,1,1,1,1,1
+nrlevels: .db
2,2,2,2,2,2,2,2
worm1set: .dw worm1p,worm1p
.db 3,0,%01111110,%10,%100 ;< >
worm1set: .dw worm1p,worm1p
.db 3,0,%01111110,%10,%100 ;< >
-worm1name: .db "
Left
",0
+worm1name: .db "
worm #01
",0
worm2set: .dw worm2p,worm2p
.db 3,0,%00111111,%10000,%1000 ;f1 f2
worm2set: .dw worm2p,worm2p
.db 3,0,%00111111,%10000,%1000 ;f1 f2
-worm2name: .db "
Right
",0
+worm2name: .db "
worm #02
",0
worm3set: .dw worm3p,worm3p
.db 3,0,%01011111,%10,%100 ;sto ,
worm3set: .dw worm3p,worm3p
.db 3,0,%01011111,%10,%100 ;sto ,
-worm3name: .db "
Top
",0
+worm3name: .db "
worm #03
",0
worm4set: .dw worm4p,worm4p
.db 3,0,%01111101,%10,%1 ;enter +
worm4set: .dw worm4p,worm4p
.db 3,0,%01111101,%10,%1 ;enter +
-worm4name: .db "
Bottom
",0
+worm4name: .db "
worm #04
",0
hipeaworm: .dw 0
end:
hipeaworm: .dw 0
end:
@@
-2692,7
+2709,7
@@
right = 20 ;&
name = 21 ;game
wormsize = 30
name = 21 ;game
wormsize = 30
-respawndelay =
4
0
+respawndelay =
8
0
maxnamelength = 9
;-----------------------------
maxnamelength = 9
;-----------------------------
diff --git
a/wormlvl.z80
b/wormlvl.z80
index 1eeda2eb17d15b9977c7966f354b5178cdc01b56..1e0ba72fb49afa9c7bf75658a3326a5bde02c16f 100644
(file)
--- a/
wormlvl.z80
+++ b/
wormlvl.z80
@@
-1,9
+1,9
@@
#include "asm86.h"
#include "ti86asm.inc"
#include "asm86.h"
#include "ti86asm.inc"
- .org $
E9
E3-16 ;$E9E3-[name size]
+ .org $
F3
E3-16 ;$E9E3-[name size]
- .db
"89" ;worm header (version .88
)
+ .db
'w',89 ;wormLevel header (version .89
)
.db 16,"Worm LevelPack I" ;level name
.dw hiscore-single ;leveldata size
.db 16,"Worm LevelPack I" ;level name
.dw hiscore-single ;leveldata size