[TI ASM] Display text on the homescreen

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

[TI ASM] Display text on the homescreen

Post by kalan_vod »

hi i get a problem when i display text on the homescreen.
it displays it correctly the first time then when i restart the game
or go into pause the text isnt displayed where i set it to be which is 0.
heres the code. any help will be appreciated :P ty

code:

Main_Menu:
b_call(_ClrLCDFull)
LD HL, 0
ld (PenCol),hl
ld hl,mmstr
b_call(_PutS)
KeyloopMM:
b_call(_GetKey)
cp k1 ;(1)
jr z,show
cp k2 ;(2)
jr z,quit
cp k3 ;(3)
jr z,quit
jr nz,keyloopmm

this is the string
mmstr:
.db " Phoenix Ripoff 1)Play 2)Info 3)Quit",0

like i said before it displays it fine at first then if i restart the game it displays it like half way down the screen
thanks
-kalan
User avatar
blueskies
Calc Wizard
Posts: 553
Joined: Tue 25 Apr, 2006 2:24 pm

Post by blueskies »

correct me if I'm wrong, but doesn't _puts look for CURROW and CURCOL for it's coordinate? So loading $0000 into CURROW and calling _puts will put your text at (0,0).
the_unknown_one
Calc Master
Posts: 1089
Joined: Fri 17 Dec, 2004 9:53 am

yep

Post by the_unknown_one »

Indeed, do what blueskies said and it should work
kms375

Post by kms375 »

Indeed. You storing the location to the wrong place. PenCol is for the graph screen(which is used by VPutS). CurCol is for the Homescreen (which is used by PutS).

change

Code: Select all

 ld (PenCol),hl 
to

Code: Select all

 ld (CurCol),hl 
and it should work.
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

cool thanks, i am new to asm hehe thanks

p.s. whats a good bat file to use to compile programs?
the code for the bat?
thanks
-kalan
koolmansam375
Extreme Poster
Posts: 479
Joined: Fri 17 Dec, 2004 11:09 pm
Contact:

Post by koolmansam375 »

download Ion from ticalc. It comes with the batch file you should use. DevPac8x comes with an updated one for compiling 83+ programs.
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

I changed your topic title. This will make it more clear to everyone what your question is about, before opening the topic :)
Image
Kalimero
Regular Member
Posts: 130
Joined: Fri 17 Dec, 2004 1:47 pm

Post by Kalimero »

kms375 wrote:change

Code: Select all

 ld (PenCol),hl 
to

Code: Select all

 ld (CurCol),hl 
and it should work.
That should be currow instead of curcol. Ti has never been really consistent. It's

currow
curcol

and

pencol
penrow

If you load HL into currow, L will go in currow and H in curcol.
If you load HL into pencol, L will go in pencol and H penrow.
Loading HL into curcol, will put L in curcol and H in the byte after that, which contains some other system data, you probably don't want to overwrite.
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

ok when i use putsprite from ion it will compile and come up with like 88 errors and just wont work.
i think it may be the bat or wat? i load into ix and use the call maybe something i did wrong?
thax
-kalan

ps. whats the difference form jr z,show // jp z,show
and also using nz in jr nz,show // jp nz,show
CalcKing
Regular Member
Posts: 147
Joined: Sat 18 Dec, 2004 3:24 am
Contact:

Post by CalcKing »

Take a look at this for the differences between jp and jr.

As for the errors with putsprite, it would be helpful if you were more specific. :)
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

as in if i call ionfastcopy or ant call from ion.inc
i get close to 100 errors and the errors point to ion.inc....:(
lolz i dont know helP? :shock:
thx
also so jp is faster and works with bigger numbers? :P
CalcKing
Regular Member
Posts: 147
Joined: Sat 18 Dec, 2004 3:24 am
Contact:

Post by CalcKing »

I have experienced similar errors when assembling for Ion, though I can't remember exactly what I did to fix them. I can say that it is probably a problem with the conditionals for 83/83+ label definitions.
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

ok thx and also is there a way to make it were i could make a varible and be able to use it in the tios or a basic program :?: like i use a asm program to move around and then when it triggers an action it would save the x and y pos of the sprite?

hehe hope i made it clear :P
thx
Kozak
Maxcoderz Staff
Posts: 791
Joined: Fri 17 Dec, 2004 5:33 pm
Location: On the dark side of the moon.
Contact:

Post by Kozak »

You can store values in existing TI-OS variables like Ans, A, B....Z etc. I think it's in asmin28days aswell.
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
lloydkirk1989
Calc Wizard
Posts: 680
Joined: Wed 22 Dec, 2004 5:37 am
Location: West Palm Beach,FL
Contact:

[TI ASM] Display text on the homescreen

Post by lloydkirk1989 »

koolmansam375 wrote:download Ion from ticalc. It comes with the batch file you should use. DevPac8x comes with an updated one for compiling 83+ programs.
Use this batch file.

Code: Select all

@echo off
echo ==== Now assembling %1.z80 for the TI-83 Plus ====
tasm -80 -i -b %1.z80 %1.bin
if errorlevel 1 goto ERRORS
rem This is necessary because of a DevPac8x bug
devpac8x %1
echo ==== Job finished. Program saved as %1.8xp ====
goto DONE
~Note~ Why would anyone want to compile an 83+ game for Ion?????
Its not as convenient or nearly as reliable as MirageOS.
Post Reply