I've gotten to a point where I'd like to test a game I'm creating but when I try to run it I get "ERROR:INVALID". I'm still fairly new to asm so this is probably a nooby mistake.
Could you post the source? It's hard to help if we don't know what you're trying to do.
On EFNet IRC: Whenever | Nick: Su-Hime | Channels: #Cemetech, #UnSS
TI-83+/84+ Projects
Yumé 2: Rika's Story - 25% Complete; Will finish to coincide with Y:tED
PC Projects
Yumé: The Eternal Dreams - rewriting environment system again
TIBiC/GO - 1%; compiling list of commands
"Alenda lux ubi orta libertas" - Let learning be cherished where liberty has arisen.
"Aut viam inveniam aut faciam" - Either I shall find a way, or I shall make one. - Hannibal
TI-83+/84+ Projects
Yumé 2: Rika's Story - 25% Complete; Will finish to coincide with Y:tED
PC Projects
Yumé: The Eternal Dreams - rewriting environment system again
TIBiC/GO - 1%; compiling list of commands
"Alenda lux ubi orta libertas" - Let learning be cherished where liberty has arisen.
"Aut viam inveniam aut faciam" - Either I shall find a way, or I shall make one. - Hannibal
- lindenk
- Newbie (Posts: 29)
- 26 Sep 2009 07:38:13 pm
- Last edited by lindenk on 26 Sep 2009 08:02:29 pm; edited 4 times in total
Of course but it's a bit long, tell me if i should edit some of it out
Edit: I've tested up to the char sprites before, I've only added the appvar save data and the equipment screens
Code:
Edit: I've tested up to the char sprites before, I've only added the appvar save data and the equipment screens
Code:
.nolist
#include "TI83Plus.inc"
.list
.org $9D93
.db $BB,$6D
main:
bcall(_ClrLCDFull)
bcall(_RunIndicOff)
set fullscrndraw,(IY+apiFlg4)
set textWrite,(IY+sGrFlags)
ld BC, 768
ld HL, TitleS
ld DE, PlotSScreen
ldir
bcall(_GrBufCpy)
;Zero out appbackupscreen
ld a,4
zeroappp:
ld hl,appbackupscreen
ld b,255
zeroapplp:
ld (hl),0
inc hl
djnz zeroapplp
dec a
cp 0
jr nz,zeroappp
;Check for appvar data
ld hl,(progptr)
chksvdta:
ld de,(PTemp)
or a
sbc hl,de
jr z,crtsvdta ;If data doesn't exist
jr c,crtsvdta
add hl,de
ld a,(hl)
and $1F
cp appvarobj
jr z,chkobj
dec hl
jr chksvdta
chksvdtaa:
ld h,d
ld l,e ;restore hl
jr chksvdta
chkobj: ;Check appvar data for identifier
dec hl
dec hl
dec hl
ld d,h ;store hl
ld e,l
ld c,(hl)
dec hl
ld b,(hl)
ld h,b ;load start of data into hl
ld l,c
inc hl ;get over size bytes
inc hl
ld a,(hl)
cp $BA
jr nz,chksvdtaa
inc hl
ld a,(hl)
cp $CA
jr nz,chksvdtaa
inc hl
ld a,(hl)
cp $DA
jr nz,chksvdtaa
inc hl
ld a,(hl)
cp $FA
jr nz,chksvdtaa
inc hl
jr cpysvdta
;Create appvar data
appvarname .db appvarobj,"FM3DATA",0
Identifier .db $BA,$CA,$DA,$FA
crtsvdta:
ld hl,appvarname
bcall(_MOV9TOOP1)
ld hl,30
bcall(_Createappvar)
inc de
inc de
ld (appbackupscreen+739),de
ld hl,Identifier
ld bc,4
ldir
cpysvdta:
ld hl,appbackupscreen+741
ex de,hl
ld bc,26
ldir
;Wait for user input, draw main menu then go to it
bcall(500Bh) ;_GetKeyRetOff 500Bh
MainMenu:
ld BC, 768
ld HL, start
ld DE, PlotSScreen
ldir
bcall(_GrBufCpy)
;########################
;#######Main Menu########
;########################
ld a,1
jp Ttlp1
MenuT:
push af
bcall(_getkey)
cp kUp
jr z, TtlUp
cp kDown
jr z, TtlDown
cp kEnter
jp z, TtlChoo
pop af
jr MenuT
;Move 2 arrows to show which option is selected
TtlUp:
pop af
cp 1
jr nz, TtlUpp
ld a,5
TtlUpp:
dec a
jr TtlCho
TtlDown:
pop af
cp 4
jr nz,TtlDwn
sub a
TtlDwn:
inc a
TtlCho:
cp %0001
jr z, Ttlp1
cp %0010
jr z, Ttlp2
cp %0011
jr z, Ttlp3
cp %0100
jp z, Ttlp4
Ttlp1:
ld hl, appbackupscreen
ld (hl), 24
inc hl
ld (hl), 19
inc hl
ld (hl), 69
inc hl
ld (hl), 19
call PPnter
jp MenuT
Ttlp2:
ld hl, appbackupscreen
ld (hl), 30
inc hl
ld (hl), 30
inc hl
ld (hl), 62
inc hl
ld (hl), 30
call PPnter
jp MenuT
Ttlp3:
ld hl, appbackupscreen
ld (hl), 28
inc hl
ld (hl), 41
inc hl
ld (hl), 64
inc hl
ld (hl), 41
call PPnter
jp MenuT
Ttlp4:
ld hl, appbackupscreen
ld (hl), 33
inc hl
ld (hl), 51
inc hl
ld (hl), 58
inc hl
ld (hl), 51
call PPnter
jp MenuT
Ttlchoo:
pop af
ld b,3
cp %0001
jp z, Adv
cp %0010
jp z, Arcadechs
cp %0011
jp z, Opt
cp %0100
jp z, exit
;#########Adventure Mode###########
Adv:
;#########################################
;###############Arcade Mode###############
;#########################################
Arcadechs: ;display screen and initalize counters
call clrchrs
push bc
ld bc,768
ld hl,arcade2
ld de,plotsscreen
ldir
pop bc
ld c,1
call arc2num
push bc
ld l,1 ;prevents 2 of the same charicters
ld a,(appbackupscreen+4)
cp l
jp z,arc2rightC
ld a,(appbackupscreen+34)
cp l
jp z,arc2rightC
ld hl,$1611
ld (pencol),hl
ld hl,strswords
call vputs
ld hl,sword
call chsprite
pop bc
sub a
jr arc2p0
ArcadechM:
push af
push bc
bcall(_getkey)
cp kUp
jr z,Arc2up
cp kDown
jr z,Arc2up
cp kLeft
jr z,Arc2left
cp kRight
jr z,Arc2right
cp kEnter
jp z,Arc2choo
jr ArcadechM
Arc2up:
pop bc
pop af
xor 1
jr nz,arc2p1
arc2p0:
ld hl, appbackupscreen
ld (hl), 60
inc hl
ld (hl), 41
inc hl
ld (hl), 32
inc hl
ld (hl), 41
call PPnter
jp ArcadechM
arc2p1:
ld hl, appbackupscreen
ld (hl), 34
inc hl
ld (hl), 53
inc hl
ld (hl), 58
inc hl
ld (hl), 53
call PPnter
jp ArcadechM
arc2left:
pop bc
pop af
sub 0
jr nz,arcadechM
ld a,c
cp 1
jr nz,arc2leftt
ld c,21
arc2leftt:
dec c
ld l,c
ld a,(appbackupscreen+4)
cp l
jr z,arc2leftC
ld a,(appbackupscreen+34)
cp l
jr z,arc2leftC
jr chtable
arc2leftC:
sub a
jr arc2left
arc2right:
pop bc
pop af
sub 0
jr nz,arcadechM
ld a,c
cp 20
jr nz,arc2rightt
ld c,0
arc2rightt:
inc c
ld l,c
ld a,(appbackupscreen+4)
cp l
jr z,arc2rightC
ld a,(appbackupscreen+34)
cp l
jr z,arc2rightC
jr chtable
arc2rightC:
sub a
jr arc2right
Arc2choo:
pop bc
pop af
cp 1
jp MainMenu
cp 0
jr equtable
chtable: ;Charicter symbol disp table
ld a,c
cp 1
jp z,chswd
cp 2
jp z,chaxe
cp 3
jp z,chpal
cp 4
jp z,chknt
cp 5
jp z,chbmg
cp 6
jp z,chsor
cp 7
jp z,chsmg
cp 8
jp z,chsum
cp 9
jp z,chele
cp 10
jp z,chthf
cp 11
jp z,chnja
cp 12
jp z,charc
cp 13
jp z,chmnk
cp 14
jp z,chpsy
cp 15
jp z,chpst
cp 16
jp z,chbrd
cp 17
jp z,chbak
cp 18
jp z,chgun
cp 19
jp z,chsom
cp 20
jp z,chtam
equtable: ;Charicter equipment table
ld a,c
cp 1
jp z,equswd
cp 2
jp z,equaxe
cp 3
jp z,equpal
cp 4
jp z,equknt
cp 5
jp z,equbmg
cp 6
jp z,equsrc
cp 7
jp z,equsmg
cp 8
jp z,equsum
cp 9
jp z,equele
cp 10
jp z,equthf
cp 11
jp z,equnja
cp 12
jp z,equarc
cp 13
jp z,equmnk
cp 14
jp z,equpsy
cp 15
jp z,equpst
cp 16
jp z,equbrd
cp 17
jp z,equbak
cp 18
jp z,equgun
cp 19
jp z,equsom
cp 20
jp z,equtam
chswd: ;Display char name and symbol
push bc
ld hl,$1611
ld (pencol),hl
ld hl,strswords
call vputs
ld hl,sword
call chsprite
pop bc
sub a
jp arcadechm
strswords .db $06,$06,$06,"Swordsman",$06,$06,$06,0
chaxe:
push bc
ld hl,appbackupscreen+743
bit 7,(hl)
jp z,chlocked
ld hl,$1612
ld (pencol),hl
ld hl,straxeman
call vputs
ld hl,axe
call chsprite
pop bc
sub a
jp arcadechm
straxeman .db $06,$06,$06,$06,"Axeman",$06,$06,$06,$06,0
chpal:
push bc
ld hl,$1613
ld (pencol),hl
ld hl,strpaladin
call vputs
ld hl,ssheild
call chsprite
pop bc
sub a
jp arcadechm
strpaladin .db $06,$06,$06,$06,"Paladin",$06,$06,$06,0
chknt:
push bc
ld hl,appbackupscreen+743
bit 6,(hl)
jp z,chlocked
ld hl,$1610
ld (pencol),hl
ld hl,strknight
call vputs
ld hl,sheild
call chsprite
pop bc
sub a
jp arcadechm
strknight .db $06,$06,$06,$06,$06,"Knight",$06,$06,$06,$06,0
chbmg:
push bc
ld hl,$1611
ld (PenCol),hl
ld hl,strblack
call vputs
ld hl,staff
call chsprite
pop bc
sub a
jp arcadechm
strblack .db $06,$06,$06,"Black Mage",$06,$06,$06,0
chsor:
push bc
ld hl,$160F
ld (pencol),hl
ld hl,strsorcerer
call vputs
ld hl,orb
call chsprite
pop bc
sub a
jp arcadechm
strsorcerer .db $06,$06,$06,$06,"Sorcerer",$06,$06,$06,$06,0
chsmg:
push bc
ld hl,appbackupscreen+743
bit 5,(hl)
jp z,chlocked
ld hl,$1610
ld (pencol),hl
ld hl,strshock
call vputs
ld hl,shock
call chsprite
pop bc
sub a
jp arcadechm
strshock .db $06,$06,$06,$06,"Shock Mage",$06,$06,$06,$06,0
chsum:
push bc
ld hl,appbackupscreen+743
bit 4,(hl)
jp z,chlocked
ld hl,$1612
ld (pencol),hl
ld hl,strsummoner
call vputs
ld hl,sum
call chsprite
pop bc
sub a
jp arcadechm
strsummoner .db $06,$06,$06,"Summoner",$06,$06,$06,0
chele:
push bc
ld hl,appbackupscreen+743
bit 3,(hl)
jp z,chlocked
ld hl,$1613
ld (pencol),hl
ld hl,strelem
call vputs
ld hl,ele
call chsprite
pop bc
sub a
jp arcadechm
strelem .db $06,$06,$06,"Elementist",$06,$06,0
chthf:
push bc
ld hl,$160F
ld (pencol),hl
ld hl,strtheif
call vputs
ld hl,dagger
call chsprite
pop bc
sub a
jp arcadechm
strtheif .db $06,$06,$06,$06,$06,$06,"Theif",$06,$06,$06,$06,$06,$06,0
chnja:
push bc
ld hl,appbackupscreen+743
bit 2,(hl)
jp z,chlocked
ld hl,$160F
ld (pencol),hl
ld hl,strninja
call vputs
ld hl,shurkin
call chsprite
pop bc
sub a
jp arcadechm
strninja .db $06,$06,$06,$06,$06,$06,"Ninja",$06,$06,$06,$06,$06,$06,0
charc:
push bc
ld hl,$1613
ld (pencol),hl
ld hl,strarcher
call vputs
ld hl,bow
call chsprite
pop bc
sub a
jp arcadechm
strarcher .db $06,$06,$06,$06,"Archer",$06,$06,$06,0
chmnk:
push bc
ld hl,$1610
ld (pencol),hl
ld hl,strmonk
call vputs
ld hl,fist
call chsprite
pop bc
sub a
jp arcadechm
strmonk .db $06,$06,$06,$06,$06,$06,"Monk",$06,$06,$06,$06,$06,$06,0
chpsy:
push bc
ld hl,appbackupscreen+743
bit 0,(hl)
jp z,chlocked
ld hl,$1610
ld (pencol),hl
ld hl,strpsion
call vputs
ld hl,psy
call chsprite
pop bc
sub a
jp arcadechm
strpsion .db $06,$06,$06,$06,$06,$06,"Psion",$06,$06,$06,$06,$06,$06,0
chpst:
push bc
ld hl,$1611
ld (pencol),hl
ld hl,strpriest
call vputs
ld hl,cross
call chsprite
pop bc
sub a
jp arcadechm
strpriest .db $06,$06,$06,$06,$06,"Priest",$06,$06,$06,$06,$06,0
chbrd:
push bc
ld hl,appbackupscreen+743
bit 1,(hl)
jp z,chlocked
ld hl,$1610
ld (pencol),hl
ld hl,strbard
call vputs
ld hl,guitar
call chsprite
pop bc
sub a
jp arcadechm
strbard .db $06,$06,$06,$06,$06,$06,"Bard",$06,$06,$06,$06,$06,$06,0
chbak:
push bc
ld hl,appbackupscreen+744
bit 7,(hl)
jp z,chlocked
ld hl,$1611
ld (pencol),hl
ld hl,strbaker
call vputs
ld hl,pie
call chsprite
pop bc
sub a
jp arcadechm
strbaker .db $06,$06,$06,$06,$06,"Baker",$06,$06,$06,$06,$06,0
chgun:
push bc
ld hl,appbackupscreen+744
bit 6,(hl)
jp z,chlocked
ld hl,$160F
ld (pencol),hl
ld hl,strgunslinger
call vputs
ld hl,gun
call chsprite
pop bc
sub a
jp arcadechm
strgunslinger .db $06,$06,$06,$06,"Gunslinger",$06,$06,$06,$06,$06,0
chsom:
push bc
ld hl,appbackupscreen+744
bit 5,(hl)
jp z,chlocked
ld hl,$1613
ld (pencol),hl
ld hl,strsketchy
call vputs
ld hl,eyes
call chsprite
pop bc
sub a
jp arcadechm
strsketchy .db $06,"Sketchy Old Man",0
chtam:
push bc
ld hl,appbackupscreen+744
bit 4,(hl)
jp z,chlocked
ld hl,$1611
ld (pencol),hl
ld hl,strtamer
call vputs
ld hl,whip
call chsprite
pop bc
sub a
jp arcadechm
strtamer .db $06,$06,$06,$06,$06,"Tamer",$06,$06,$06,$06,$06,$06,0
chlocked:
ld hl,$1611
ld (pencol),hl
ld hl,strlocked
call vputs
ld hl,lock
call chsprite
pop bc
sub a
jp arcadechm
strlocked .db $06,$06,$06,$06,"Locked",$06,$06,$06,$06,$06,0
equswd: ;display weapon menu for selected char and record
push bc ;choices
push af
call equldwae
ld a,1
call arc3disp
equswd2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strswdw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strswdw2
call vputs
call dispwep
call equcomp
equswd3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmChain
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmLeather
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equswd2
bit 3,(ix+0)
call z,armChain
call nz,armLeather
equswd4:
ld hl,appbackupscreen+747
bit 7,(hl)
jr z,equswd5
ld hl,$1E10
ld (pencol),hl
ld hl,strswde1
call vputs
set 5,(ix+0)
call dispacc
bcall(_GetKey)
equswd5:
pop af
pop bc
dec b
dec ix
ld (ix+0),1
ld hl,1000
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strswdw1 .db "Broadsword",0
strswdw2 .db "Shadow Sword",0
strswde1 .db "Aura Gem",0
equaxe:
ld hl,appbackupscreen+743 ;Checks if this char is
bit 7,(hl) ;unlocked
jp z,arcadechs
push bc
push af
call equldwae ;load ix to the correct char data location
ld a,1
call arc3disp ;draw equip screen and display
equaxe2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,straxew1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,straxew2
call vputs
call dispwep
call equcomp ;input routine
equaxe3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmChain
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmPlate
call vputs
call disparmor
call equcomp
bit 7,(ix+0) ;checks if back was chosen
jr nz,equaxe2
bit 3,(ix+0)
call z,armChain ;loads armor stats
call nz,armPlate
equaxe4:
ld hl,appbackupscreen+747 ;checks if accessory is
bit 6,(hl) ;unlocked
jr z,equaxe5
ld hl,$1E10
ld (pencol),hl
ld hl,straxee1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equaxe5:
pop af
pop bc
dec b
dec ix
ld (ix+0),2 ;Char #
ld hl,1100 ;Char hp
ld (ix+2),h
ld (ix+3),l
jp arcadechs
straxew1 .db "Great Axe",0
straxew2 .db "Wrath",0
straxee1 .db "???",0 ;Will add later
equpal:
push bc
push af
call equldwae
ld a,1
call arc3disp
equpal2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strpalw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strpalw2
call vputs
call dispwep
call equcomp
equpal3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmBuckler
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmSsheild
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equpal2
bit 3,(ix+0)
call z,armbuckler
call nz,armSsheild
equpal4:
ld hl,appbackupscreen+747
bit 5,(hl)
jr z,equpal5
ld hl,$1E10
ld (pencol),hl
ld hl,strpale1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equpal5:
pop af
pop bc
dec b
dec ix
ld (ix+0),3
ld hl,1250
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strpalw1 .db "Gladius",0
strpalw2 .db "Godblade",0
strpale1 .db "???",0
equKnt:
ld hl,appbackupscreen+743
bit 6,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equknt2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strkntw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strkntw2
call vputs
call dispwep
call equcomp
equknt3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmBuckler
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmPlate
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equknt2
bit 3,(ix+0)
call z,armBuckler
call nz,armPlate
equknt4:
ld hl,appbackupscreen+747
bit 4,(hl)
jr z,equknt5
ld hl,$1E10
ld (pencol),hl
ld hl,strknte1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equknt5:
pop af
pop bc
dec b
dec ix
ld (ix+0),4
ld hl,1250
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strkntw1 .db "Long Sword",0
strkntw2 .db "Demon Blade",0
strknte1 .db "???",0
equbmg:
push bc
push af
call equldwae
ld a,1
call arc3disp
equbmg2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strbmgw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strbmgw2
call vputs
call dispwep
call equcomp
equbmg3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmLeather
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmMagic
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equbmg2
bit 3,(ix+0)
call z,armLeather
call nz,armMagic
equbmg4:
ld hl,appbackupscreen+747
bit 3,(hl)
jr z,equbmg5
ld hl,$1E10
ld (pencol),hl
ld hl,strbmge1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equbmg5:
pop af
pop bc
dec b
dec ix
ld (ix+0),5
ld hl,900
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strbmgw1 .db "Flame Staff",0
strbmgw2 .db "Frost Staff",0
strbmge1 .db "???",0
equsrc:
push bc
push af
call equldwae
ld a,1
call arc3disp
equsrc2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strsrcw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strsrcw2
call vputs
call dispwep
call equcomp
equsrc3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmMagic
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmMystic
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equsrc2
bit 3,(ix+0)
call z,armMagic
call nz,armMystic
equsrc4:
ld hl,appbackupscreen+747
bit 2,(hl)
jr z,equsrc5
ld hl,$1E10
ld (pencol),hl
ld hl,strsrce1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equsrc5:
pop af
pop bc
dec b
dec ix
ld (ix+0),6
ld hl,900
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strsrcw1 .db "Sky Orb",0
strsrcw2 .db "Earth Orb",0
strsrce1 .db "???",0
equsmg:
ld hl,appbackupscreen+743
bit 5,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equsmg2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strsmgw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strsmgw2
call vputs
call dispwep
call equcomp
equsmg3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmThund
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmMagic
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equsmg2
bit 3,(ix+0)
call z,armThund
call nz,armMagic
equsmg4:
ld hl,appbackupscreen+747
bit 1,(hl)
jr z,equsmg5
ld hl,$1E10
ld (pencol),hl
ld hl,strsmge1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equsmg5:
pop af
pop bc
dec b
dec ix
ld (ix+0),7
ld hl,900
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strsmgw1 .db "Shock Staff",0
strsmgw2 .db "Lightning Wand",0
strsmge1 .db "???",0
equSum:
ld hl,appbackupscreen+743
bit 4,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equsum2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strsumw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strsumw2
call vputs
call dispwep
call equcomp
equsum3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmMagic
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmSum
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equsum2
bit 3,(ix+0)
call z,armMagic
call nz,armSum
equsum4:
ld hl,appbackupscreen+747
bit 0,(hl)
jr z,equsum5
ld hl,$1E10
ld (pencol),hl
ld hl,strsume1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equsum5:
pop af
pop bc
dec b
dec ix
ld (ix+0),8
ld hl,900
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strsumw1 .db "Angelic Symbol",0
strsumw2 .db "Demonic Symbol",0
strsume1 .db "Cowboy Hat",0
equele:
ld hl,appbackupscreen+743
bit 3,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equele2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strelew1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strelew2
call vputs
call dispwep
call equcomp
equele3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmLeather
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmMagic
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equele2
bit 3,(ix+0)
call z,armLeather
call nz,armMagic
equele4:
ld hl,appbackupscreen+748
bit 7,(hl)
jr z,equele5
ld hl,$1E10
ld (pencol),hl
ld hl,strelee1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equele5:
pop af
pop bc
dec b
dec ix
ld (ix+0),9
ld hl,900
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strelew1 .db "FrostFlame Gloves",0
strelew2 .db "SandStorm Gloves",0
strelee1 .db "Fusion Gem",0
equthf:
push bc
push af
call equldwae
ld a,1
call arc3disp
equthf2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strthfw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strthfw2
call vputs
call dispwep
call equcomp
equthf3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmLeather
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmCloak
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equthf2
bit 3,(ix+0)
call z,armLeather
call nz,armCloak
equthf4:
ld hl,appbackupscreen+748
bit 6,(hl)
jr z,equthf5
ld hl,$1E10
ld (pencol),hl
ld hl,strthfe1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equthf5:
pop af
pop bc
dec b
dec ix
ld (ix+0),10
ld hl,1000
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strthfw1 .db "Assain's Dagger",0
strthfw2 .db "Ninja Knife",0
strthfe1 .db "???",0
equnja:
ld hl,appbackupscreen+743
bit 2,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equnja2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strnjaw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strnjaw2
call vputs
call dispwep
call equcomp
equnja3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmLeather
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmCloak
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equnja2
bit 3,(ix+0)
call z,armLeather
call nz,armCloak
equnja4:
ld hl,appbackupscreen+748
bit 5,(hl)
jr z,equnja5
ld hl,$1E10
ld (pencol),hl
ld hl,straxee1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equnja5:
pop af
pop bc
dec b
dec ix
ld (ix+0),11
ld hl,1000
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strnjaw1 .db "Katana",0
strnjaw2 .db "Ninja Knife",0
strnjae1 .db "???",0
equarc:
push bc
push af
call equldwae
ld a,1
call arc3disp
equarc2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarcw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarcw2
call vputs
call dispwep
call equcomp
equarc3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmLeather
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmSpandex
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equarc2
bit 3,(ix+0)
call z,armLeather
call nz,armSpandex
equarc4:
ld hl,appbackupscreen+748
bit 4,(hl)
jr z,equarc5
ld hl,$1E10
ld (pencol),hl
ld hl,strarce1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equarc5:
pop af
pop bc
dec b
dec ix
ld (ix+0),12
ld hl,1000
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strarcw1 .db "Pheonix Arrow",0
strarcw2 .db "Ocean's Wrath",0
strarce1 .db "???",0
equmnk:
push bc
push af
call equldwae
ld a,1
call arc3disp
equmnk2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strmnkw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strmnkw2
call vputs
call dispwep
call equcomp
equmnk3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmGarb
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmLeather
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equmnk2
bit 3,(ix+0)
call z,armGarb
call nz,armLeather
equmnk4:
ld hl,appbackupscreen+748
bit 3,(hl)
jr z,equmnk5
ld hl,$1E10
ld (pencol),hl
ld hl,strswde1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equmnk5:
pop af
pop bc
dec b
dec ix
ld (ix+0),13
ld hl,1100
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strmnkw1 .db "Bloody Knuckles",0
strmnkw2 .db "Fists of Fury",0
equpsy:
ld hl,appbackupscreen+743
bit 0,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equpsy2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strpsyw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strpsyw2
call vputs
call dispwep
call equcomp
equpsy3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmLeather
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmGarb
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equpsy2
bit 3,(ix+0)
call z,armLeather
call nz,armGarb
equpsy4:
ld hl,appbackupscreen+748
bit 2,(hl)
jr z,equpsy5
ld hl,$1E10
ld (pencol),hl
ld hl,strpsye1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equpsy5:
pop af
pop bc
dec b
dec ix
ld (ix+0),14
ld hl,1000
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strpsyw1 .db "Crimson Blindfold",0
strpsyw2 .db "Sky-Blue Blindfold",0
strpsye1 .db "???",0
equpst:
push bc
push af
call equldwae
ld a,1
call arc3disp
equpst2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strpstw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strpstw2
call vputs
call dispwep
call equcomp
equpst3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmLeather
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmPreist
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equpst2
bit 3,(ix+0)
call z,armLeather
call nz,armPreist
equpst4:
ld hl,appbackupscreen+748
bit 1,(hl)
jr z,equPst5
ld hl,$1E10
ld (pencol),hl
ld hl,strPste1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equpst5:
pop af
pop bc
dec b
dec ix
ld (ix+0),15
ld hl,1000
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strpstw1 .db "Healing Hands",0
strpstw2 .db "Enhancment Staff",0
strpste1 .db "???",0
equbrd:
ld hl,appbackupscreen+743
bit 1,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equbrd2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strbrdw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strbrdw2
call vputs
call dispwep
call equcomp
equbrd3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmLeather
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmGarb
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equbrd2
bit 3,(ix+0)
call z,armLeather
call nz,armGarb
equbrd4:
ld hl,appbackupscreen+748
bit 0,(hl)
jr z,equbrd5
ld hl,$1E10
ld (pencol),hl
ld hl,strbrde1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equbrd5:
pop af
pop bc
dec b
dec ix
ld (ix+0),16
ld hl,1000
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strbrdw1 .db "Electric Guitar",0
strbrdw2 .db "Acostic Guitar",0
strbrde1 .db "???",0
equbak:
ld hl,appbackupscreen+744
bit 7,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equbak2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strbakw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strbakw2
call vputs
call dispwep
call equcomp
equbak3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmGarb
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmCheif
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equbak2
bit 3,(ix+0)
call z,armGarb
equbak4:
ld hl,appbackupscreen+749
bit 7,(hl)
jr z,equbak5
ld hl,$1E10
ld (pencol),hl
ld hl,strbake1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equbak5:
pop af
pop bc
dec b
dec ix
ld (ix+0),17
ld hl,1000
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strbakw1 .db "Egg Whisk",0
strbakw2 .db "CookBook",0
strbake1 .db "???",0
equgun:
ld hl,appbackupscreen+744
bit 6,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equgun2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strgunw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strgunw2
call vputs
call dispwep
call equcomp
equgun3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmLeather
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmGarb
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equgun2
bit 3,(ix+0)
call z,armleather
call nz,armGarb
equgun4:
ld hl,appbackupscreen+749
bit 6,(hl)
jr z,equgun5
ld hl,$1E10
ld (pencol),hl
ld hl,strgune1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equgun5:
pop af
pop bc
dec b
dec ix
ld (ix+0),18
ld hl,1000
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strgunw1 .db "Twin Pistols",0
strgunw2 .db "Sniper Rifle",0
strgune1 .db "???",0
equsom:
ld hl,appbackupscreen+744
bit 5,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equsom2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strsomw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strsomw2
call vputs
call dispwep
call equcomp
equsom3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmGarb
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmHobo
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equsom2
bit 3,(ix+0)
call z,armGarb
call nz,armHobo
equsom4:
ld hl,appbackupscreen+749
bit 5,(hl)
jr z,equsom5
ld hl,$1E10
ld (pencol),hl
ld hl,strsome1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equsom5:
pop af
pop bc
dec b
dec ix
ld (ix+0),19
ld hl,1111
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strsomw1 .db "Whisky Bottle",0
strsomw2 .db "Refried Beans",0
strsome1 .db "???",0
equtam:
ld hl,appbackupscreen+744
bit 4,(hl)
jp z,arcadechs
push bc
push af
call equldwae
ld a,1
call arc3disp
equtam2:
res 7,(ix+0)
ex af,af'
ld a,200
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strtamw1
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strtamw2
call vputs
call dispwep
call equcomp
equtam3:
ex af,af'
ld a,201
ex af,af'
ld hl,$1E10
ld (pencol),hl
ld hl,strarmGarb
call vputs
ld hl,$2614
ld (pencol),hl
ld hl,strarmChain
call vputs
call disparmor
call equcomp
bit 7,(ix+0)
jr nz,equtam2
bit 3,(ix+0)
call z,armGarb
call nz,armChain
equtam4:
ld hl,appbackupscreen+749
bit 4,(hl)
jr z,equtam5
ld hl,$1E10
ld (pencol),hl
ld hl,strtame1
call vputs
set 5,(ix+0)
call dispacc
bcall(_getkey)
equtam5:
pop af
pop bc
dec b
dec ix
ld (ix+0),2
ld hl,1100
ld (ix+2),h
ld (ix+3),l
jp arcadechs
strtamw1 .db "Dragon Whip",0
strtamw2 .db "Cool Whip",0
strtame1 .db "???",0
equup: ;Move cursor up, a is the position counter
inc sp
inc sp
pop af
push af
dec sp
dec sp
cp 3
jr nz,equupp
sub a
equupp:
inc a
jr equpter
equdown: ;" " only down
inc sp
inc sp
pop af
push af
dec sp
dec sp
cp 1
jr nz,equdownn
ld a,4
equdownn:
dec a
equpter:
push af
cp 1
jr z,equpter1
cp 2
jr z,equpter2
cp 3
jr z,equpter3
equpter1:
ld hl, appbackupscreen
ld (hl), 07
inc hl
ld (hl), $1F
inc hl
ld (hl), 86
inc hl
ld (hl), $1F
call PPnter
jr equcomp
equpter2:
ld hl, appbackupscreen
ld (hl), 07
inc hl
ld (hl), $27
inc hl
ld (hl), 86
inc hl
ld (hl), $27
call PPnter
jr equcomp
equpter3:
ld hl, appbackupscreen
ld (hl), 34
inc hl
ld (hl), 53
inc hl
ld (hl), 58
inc hl
ld (hl), 53
call PPnter
jr equcomp
equcomp:
bcall(_getkey)
cp kup
jr z,equup
cp kdown
jr z,equdown
cp kenter
jr z,equwae
jr equcomp
equwae: ;these routines could use some improvement
ex af,af'
cp 200
call z,equwep
cp 201
call z,equarm
ret
equldwae:
pop de ;set ix to the correct charicter's equipment
pop af ;record
pop bc
push bc
push af
push de
ld a,b
cp 3
jr nz,equldwae2
ld hl,appbackupscreen+5
push hl
pop ix
ret
equldwae2:
cp 2
jr nz,equldwae3
ld hl,appbackupscreen+35
push hl
pop ix
ret
equldwae3:
ld hl,appbackupscreen+65
push hl
pop ix
ret
equwep: ;records chosen weapon/armor or back
ex af,af'
cp 3
jr nz,equwepp
ld (ix+0),0
equwepp:
cp 2
jr nz,equweppp
ld (ix+0),1
equweppp:
cp 1
ret nz
inc sp;
inc sp
inc sp;
inc sp
inc sp;
inc sp
pop bc
jp arcadechs
equarm:
ex af,af'
cp 3
jr nz,equarmm
res 3,(ix+0)
equarmm:
cp 2
jr nz,equarmmm
set 3,(ix+0)
equarmmm:
cp 1
ret nz
set 7,(ix+0)
ret
strarmchain .db "Chain Mail"
strarmleather .db "Leather Armor"
strarmplate .db "Plate Mail"
strarmbuckler .db "Buckler"
strarmSsheild .db "Spirit Sheild"
strarmMagic .db "Magic Robes"
strarmMystic .db "Mystic Robes"
strarmThund .db "Thunder Robes"
strarmSum .db "Summoner's Garb"
strarmCloak .db "Assian's Cloak"
strarmSpandex .db "Spandex Suit"
strarmPreist .db "Preist's Robes"
strarmGarb .db "Traveler's Garb"
strarmCheif .db "Cheif's Hat"
strarmHobo .db "Hobo's Cloths"
armChain:
ld (ix+8),3 ;+15% PDef
ret
armLeather:
ld (ix+10),2 ;+10% MDef
ld (ix+14),2 ;+10% Evade
ret
armPlate:
ld (ix+8),7 ;+35% PDef
ld (ix+15),4 ;-20% Evade
ret
armBuckler:
ld (ix+8),5 ;+25% PDef
ret
armSsheild:
ld (ix+10),5 ;+25% MDef
ret
armMagic:
ld (ix+6),2 ;+10% MAtt
ld (ix+10),2 ;+10% MDef
ld (ix+9),2 ;-10% PDef
ret
armMystic:
ld (ix+6),4 ;+20% MAtt
ld (ix+9),2 ;-10% PDef
ret
armThund:
ld (ix+9),3 ;-15% PDef
ret
armSum:
ld (ix+3),40 ;+4 Fury
ld (ix+9),2 ;-10% PDef
ret
armCloak:
ld (ix+14),5 ;+25% Evade
ret
armSpandex:
ld (ix+10),6 ;+30% MDef
ret
armPreist:
ld (ix+9),2 ;-10% PDef
ret
armGarb:
ld (ix+8),2 ;+10% PDef
ld (ix+10),2 ;+10% MDef
ret
armHobo:
ld a,r ;pseudorandom number 0-255
and %00000100 ;a=0 or 4
ld (ix+10),a ;+0 or 20% PDef
ld (ix+8),a ;+0 or 20% MDef
ret
chsprite:
push hl ;clear sprite box
ld hl,zero
ld b,11
ld de,$262A
call andsprite
ld b,11
ld de,$2632
push ix
pop hl
call andsprite
pop hl
ld b,11 ;draw sprite in sprite box
ld de,$262A
call putsprite
ld b,11
ld de,$2632
push ix
pop hl
call putsprite
call ppnter
ret
vputs: ;I'm planning on making this into an app later
ld a,(hl)
or a
ret z
bcall(_vputmap)
inc hl
jr vputs
arc2num: ;display what char slot user is on
ld hl,$0D41
ld (pencol),hl
ld a,b
cp 3
jr z,arc2num1
cp 2
jr z,arc2num2
ld a,'3'
bcall(_VPutMap)
ret
arc2num1:
ld a,'1'
bcall(_vPutMap)
ret
arc2num2:
ld a,'2'
bcall(_vPutMap)
ret
arc3disp: ;draw equipment choice screen
ld bc,768
ld hl,arcade3
ld de,plotsscreen
ldir
ld hl,$1513
ld (Pencol),hl
ld hl,strwep
call vputs
bcall(_grbufcpy)
ret
dispwep:
ld hl,$1513
ld (Pencol),hl
ld hl,strwep
call vputs
bcall(_grbufcpy)
ret
disparmor:
ld hl,$1511
ld (Pencol),hl
ld hl,strarmor
call vputs
bcall(_grbufcpy)
ret
dispacc:
ld hl,$1515
ld (Pencol),hl
ld hl,stracc
call vputs
bcall(_grbufcpy)
ret
clrchrs: ;clear charicter data
push bc
ld de,30
ld hl,appbackupscreen+94
ld a,b
cp 3
jr clrchrsalla
cp 2
jr clrchrs2a
cp 1
jr clrchrs1a
pop bc
pop af
jp exit;#######This will go on to monster select#####
clrchrsalla:
sub a
jr clrchrsall
clrchrs2a:
sub a
jr clrchrs2
clrchrs1a:
sub a
jr clrchrs1
clrchrsall:
or a
sbc hl,de
add a,e
clrchrs2:
or a
sbc hl,de
add a,e
clrchrs1:
or a
sbc hl,de
add a,e
ld b,a
Clrchrloop:
ld (hl),0
inc hl
djnz clrchrloop
pop bc
ret
strwep .db $06,$06,$06,"Weapon",$06,$06,$06,$06,0
strarmor .db $06,$06,$06,$06,"Armor",$06,$06,$06,$06,$06,0
stracc .db $06,$06,"Accessory",$06,$06,$06,0
.nolist ;charicter sprites
sword #include "sword.z80"
axe #include "axe.z80"
sheild #include "sheild.z80"
ssheild #include "ssheild.z80"
staff #include "staff.z80"
orb #include "orb.z80"
shock #include "shock.z80"
sum #include "sum.z80"
ele #include "ele.z80"
dagger #include "dagger.z80"
shurkin #include "shurkin.z80"
bow #include "bow.z80"
fist #include "fist.z80"
psy #include "psy.z80"
cross #include "cross.z80"
guitar #include "guitar.z80"
pie #include "pie.z80"
gun #include "gun.z80"
eyes #include "eyes.z80"
whip #include "whip.z80"
lock #include "lock.z80"
zero:
.db %00000000,%00000000
.db %00000000,%00000000
.db %00000000,%00000000
.db %00000000,%00000000
.db %00000000,%00000000
.db %00000000,%00011111
.db %00011111,%00011111
.db %00011111,%00011111
.db %00011111,%00011111
.db %00011111,%00011111
.db %00011111,%00011111
.list
;#########Options#########
Opt:
PPnter: ;draw, display then erase pointers
push af ;I've used this to display sprites
push bc ;drawn to the buffer as well to make sure
ld b, 6 ;the pointers stay were they are
ld de, (appBackUpScreen)
ld hl, pointer
call PutSprite
ld b, 6
ld de, (appBackUpScreen+2)
ld hl, lpointer
call PutSprite
bcall(_GrBufCpy)
ld b, 6
ld de, (appBackUpScreen)
ld hl, pointer
call PutSprite
ld b, 6
ld de, (appBackUpScreen+2)
ld hl, lpointer
call PutSprite
pop bc
pop af
ret
#include "Mods.inc" ;Includes andsprite and xorsprite
.nolist
TitleS #include "Title.z80"
Start #include "Start.z80"
pointer #include "pointer.z80"
lpointer #include "lpointer.z80"
Arcade2 #include "Arcade3.z80"
Arcade3 #include "Arcade4.z80"
.list
exit:
set apdable,(iy+apdflags)
ret
; bjump(_JForceCmdNoChar)
.END
I didn't bother reading your code yet, so I'm sure there will be plenty of nits to pick, but how are you running your program? prgmNAME, or Asm(prgmNAME?
lindenk wrote:
Asm(Progname, I'd get a syntax error otherwise
I see your problem. Replace this:
Code:
.org $9D95
main:
bcall(_ClrLCDFull)
Code:
.org $9D93
.db $BB,$6D
main:
bcall(_ClrLCDFull)
I've been testing it but this is the first time I got this error. The save data and equipment screens are what I added since I last tested it. I probably should have separated it into a few files but most of it is just for 1 set of menus
lindenk wrote:
I've been testing it but this is the first time I got this error. The save data and equipment screens are what I added since I last tested it. I probably should have separated it into a few files but most of it is just for 1 set of menus
It should never have worked if you were missing the $BB,$6D header at the top...
I've only ever been able to get stuff to work by doing
Code:
I've never been able to get headers to work right, not even when I copy and paste them from something known to work.
Code:
.org $9d95
.db $BB,6D
I've never been able to get headers to work right, not even when I copy and paste them from something known to work.
Will_W wrote:
I've only ever been able to get stuff to work by doing
Code:
I've never been able to get headers to work right, not even when I copy and paste them from something known to work.
That's completely incorrect, though! The header needs to be two bytes below ProgStart ($9d95) so that your actual code starts at $9d95. Otherwise, the bb6d will be executed by the CPU before your code; I don't recall what the exact operation equivalent is, but I'm sure it's no fun.
Code:
.org $9d95
.db $BB,6D
I've never been able to get headers to work right, not even when I copy and paste them from something known to work.
Edit: eh, it's not terrible:
Code:
cp e
ld l,l
KermMartian wrote:
Will_W wrote:
I've only ever been able to get stuff to work by doing
Code:
I've never been able to get headers to work right, not even when I copy and paste them from something known to work.
That's completely incorrect, though! The header needs to be two bytes below ProgStart ($9d95) so that your actual code starts at $9d95. Otherwise, the bb6d will be executed by the CPU before your code; I don't recall what the exact operation equivalent is, but I'm sure it's no fun.
Code:
.org $9d95
.db $BB,6D
I've never been able to get headers to work right, not even when I copy and paste them from something known to work.
Edit: eh, it's not terrible:
Code:
cp e
ld l,l
Well isn't $BB,6D just the Asm(AsmPrgm? It still worked for me as long as I added them in after i compiled it. For some reason it never really worked right when put it in the code anyway; it would either return 0 like it is now or crash.
lindenk wrote:
Well isn't $BB,6D just the Asm(AsmPrgm? It still worked for me as long as I added them in after i compiled it. For some reason it never really worked right when put it in the code anyway; it would either return 0 like it is now or crash.
Not at all, BB, 6D is the AsmPrgm token, it has nothing to do with the Asm( command. Adding it in after you compiled it shouldn't work, because the addressing would be all messed up, as calc84 pointed out. I suppose since you compiled relative to $9d95 and then added it, the calculator would end up doing the right thing since the OS would remove the first two bytes that you added by hand, but that's shockingly bad practice (not to mention a waste of your time). calc84maniac wrote:
Technically, you could say:
Code:
Assuming your assembler doesn't output raw binary data contiguously, that is (eg TASM). Code:
.db $bb,$6d
.org $9d95
benryves wrote:
calc84maniac wrote:
Technically, you could say:
Code:
Assuming your assembler doesn't output raw binary data contiguously, that is (eg TASM).Code:
.db $bb,$6d
.org $9d95
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
» Goto page 1, 2 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 1 of 2
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement