This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
Jerros


Newbie


Joined: 03 Jul 2010
Posts: 8

Posted: 04 Jul 2010 03:36:56 am    Post subject:

I've recently converted my programm for the TI 84+ to an APP, but now all of my sprites and text is messed up, though it worked fine before.
If anyone has a routine that shows small font text on specific coordinates, that'd be great!
You will get the credits ofcourse.
I'm a real newb in assembly, so don't be afraid to overexplain things.

Any help here would be greatly appreciated!
Back to top
tr1p1ea


Elite


Joined: 03 Aug 2003
Posts: 870

Posted: 04 Jul 2010 07:26:30 am    Post subject:

What are you using to display sprites and is this a single or multi-page APP?

The reason why things are not working is most likely because you are using BCALL's which are switching ROM pages around leaving your inputs pointing to unexpected data.

You can either copy data to RAM before displaying and then call _vPutS or work through the string one char at a time using _vPutMap.
Back to top
Jerros


Newbie


Joined: 03 Jul 2010
Posts: 8

Posted: 04 Jul 2010 08:39:10 am    Post subject:

Thanks for your reply.
It's currently a single-page App, though it might get larger in the furure.
How do I copy my data to the RAM?
That sounds like a real solution, can you give me an example script? (if its not to much trouble of course)
Currently I'm using this to display text:

LD HL, $3604
LD (PenCol), HL
LD HL, achtxtAB2
b_call(_VPutS)
Back to top
calcdude84se


Member


Joined: 09 Aug 2009
Posts: 207

Posted: 04 Jul 2010 09:04:45 am    Post subject:

For copying to RAM, just use ldir and copy to a safe RAM area like appBackupScreen, statVars, or something else, like this:

Code:
ld hl,achtxtAB2
ld de,safeRAM
ld bc,textlen ;the length of the text, including the ending 00h
ldir

and later on, when you want to display it:

Code:
ld hl,$3604
ld (penCol),hl
ld hl,safeRAM
b_call(_vPutS)

However, like tr1p1ea suggested, it might be easier to just display one character at a time with _vPutMap, and have a routine you call to display a string.

Code:
;_safeVPutS
loop:
ld a,(hl)
inc hl
or a ;Better than cp 0, this tests for the end of the string
ret z
b_call(_vPutMap)
jr loop


Last edited by Guest on 04 Jul 2010 09:08:18 am; edited 1 time in total
Back to top
Jerros


Newbie


Joined: 03 Jul 2010
Posts: 8

Posted: 05 Jul 2010 05:25:40 am    Post subject:

calcdude84se wrote:

For copying to RAM, just use ldir and copy to a safe RAM area like appBackupScreen, statVars, or something else, like this:

Code:
ld hl,achtxtAB2
ld de,safeRAM
ld bc,textlen ;the length of the text, including the ending 00h
ldir

and later on, when you want to display it:

Code:
ld hl,$3604
ld (penCol),hl
ld hl,safeRAM
b_call(_vPutS)



Works perfectly, thanyou so very very much!
After some messing around, I've made things work using your advice.
Like I said, I'm not very advanced into asm, so there was some experimenting involved, but thanks to you I can now display the text noramlly again!
thnks!
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement