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
victor kwok


Newbie


Joined: 11 Oct 2010
Posts: 6

Posted: 13 Oct 2010 03:50:42 am    Post subject:

I know how to put text on the normal screen using z80( taught in many tutorials) but I really want to know if there is any way to put the text in the graph screen because no tutorial talks about this.[size="7"] Please HELP!!!!!!!!!!![/size]
Back to top
victor kwok


Newbie


Joined: 11 Oct 2010
Posts: 6

Posted: 14 Oct 2010 06:12:33 am    Post subject:

I know how to put text on the normal screen using z80( taught in many tutorials) but I really want to know if there is any way to put the text in the graph screen because no tutorial talks about this.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 14 Oct 2010 12:47:53 pm    Post subject:

What have you tried?
Back to top
DrDnar


Member


Joined: 28 Aug 2009
Posts: 116

Posted: 14 Oct 2010 01:42:48 pm    Post subject:

You need to check the TI SDK documentation. I believe there is a flag you set that makes the normal font routines write to the graph buffer.
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 14 Oct 2010 01:48:50 pm    Post subject:

Now do you mean the graph screen style text instead of your standard Large font used on the home screen or do you mean something else?

Edit: I see what you mean. I was being dumb ha.

There is a flag you need to set I think it is textWrite, (IY + sGrFlags) = 1 will write to the graph buffer and 0 will write small text on the display


Last edited by Guest on 14 Oct 2010 04:43:58 pm; edited 1 time in total
Back to top
victor kwok


Newbie


Joined: 11 Oct 2010
Posts: 6

Posted: 15 Oct 2010 09:30:29 am    Post subject:

I have setted the flag as you said, but it still can't do it , what is the problem please help
here is what I wrote:
.nolist
#include "ti83plus.inc"
.list
.org $9D93
.db t2Bytetok, tAsmCmp
set textWrite,(IY + sGrFlags)
b_call(_ClrLCDFull)
ld hl,text
b_call(_PutS)
res textWrite,(IY + sGrFlags)
ret
text:
.db "testing",0
.end
.end
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 15 Oct 2010 12:03:00 pm    Post subject:

victor kwok wrote:

I have setted the flag as you said, but it still can't do it , what is the problem please help
here is what I wrote:
.nolist
#include "ti83plus.inc"
.list
.org $9D93
.db t2Bytetok, tAsmCmp
set textWrite,(IY + sGrFlags)
b_call(_ClrLCDFull)
ld hl,text
b_call(_PutS)
res textWrite,(IY + sGrFlags)
ret
text:
.db "testing",0
.end
.end


My bad it has been a long time since I've done any z80. I had forgotten about the case sensitive stuff.


Code:

    set textwrite,(iy + sgrflags)
    res textwrite,(iy + sgrflags)


should work just fine.
If you still got questions just ask...I'll keep trying to help, your bringing stuff back up so my help can only get better ha
Back to top
FloppusMaximus


Advanced Member


Joined: 22 Aug 2008
Posts: 472

Posted: 15 Oct 2010 09:41:06 pm    Post subject:

PutS draws directly to the LCD, never to the graph buffer. The textWrite flag only affects the VPutMap, VPutS, and VPutSN routines. Furthermore, when textWrite is set, the routines only draw text to the graph buffer, not to the LCD, so you then need to copy the graph buffer to the screen when you're done (e.g., using GrBufCpy or ionFastCopy.)

If you want to display the large font (as with PutS) on the graph buffer, you can set fracDrawLFont, (iy + fontFlags), when calling VPutMap and VPutS.

Be sure that you reset both the textWrite and fracDrawLFont flags before exiting your program.
Back to top
victor kwok


Newbie


Joined: 11 Oct 2010
Posts: 6

Posted: 16 Oct 2010 02:07:39 am    Post subject:

Thanks a lot! I've finally managed to put text on the graph screen. I also want to know how to put a point/dot on graph screen and a line not from end to end. Thanks again! Very Happy
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 17 Oct 2010 02:18:34 am    Post subject:

I know there are a couple of different ways to draw lines and a few different bcalls that you could use if I remember correctly.

If speed isnt an issue you could use bcall(_darkline)


Code:

ld bc,6*256+6 ;start point at 6,6
ld de,20*256+6 ;end point 20,6


now I think you have some options here


Code:

set plotloc, (iy+plotFlags) = 1 is for the display and = 0 for drawing to the display and plotsscreen I think
bcall(_darkline)


Dont forget to res the plotloc before you return home
Correct me if I'm wrong on any of this maximus, it has been a long time. You are far more knowledgeable on this topic anyhow ha.
Back to top
FloppusMaximus


Advanced Member


Joined: 22 Aug 2008
Posts: 472

Posted: 17 Oct 2010 04:42:44 pm    Post subject:

Also, there's the bufferOnly flag, which draws to the graph buffer only (like textWrite does for text.) That mode is the fastest, but it's still rather slow.

All this stuff (IPoint, ILine, DarkLine, etc.) is documented in the SDK.

In a MirageOS or DoorsCS program, you can use the shell's point and line drawing routines. These routines only draw to the graph buffer, but are much faster than the OS's routines. The line drawing routines don't support clipping, however.
Back to top
victor kwok


Newbie


Joined: 11 Oct 2010
Posts: 6

Posted: 18 Oct 2010 07:40:16 am    Post subject:

This is my window size:
Xmin=-10
Xmax=10
Xscl=1
Ymin=-10
Ymax=0
Yscl=1
Xres=1
This is what I wrote:
.nolist
#include "ti83plus.inc"
.list
.org $9D93
.db t2ByteTok, tAsmCmp
b_call(_clrlcdfull)
ld bc,7*256+10 ;start point 7,10
ld de,9*256+10 ;end point 9,10
ret
.end
.end

But the line didn't appear, what's wrong?? Wink
Back to top
calc84maniac


Elite


Joined: 22 Jan 2007
Posts: 770

Posted: 18 Oct 2010 10:30:12 am    Post subject:

Maybe because you didn't actually call a line routine?
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 18 Oct 2010 02:04:50 pm    Post subject:

Ya there is more to it in my post.

I dont know if you've read over asmin28days but that is a pretty good set of tutorials...which I will have to look over again as well ha
Back to top
victor kwok


Newbie


Joined: 11 Oct 2010
Posts: 6

Posted: 19 Oct 2010 03:58:03 am    Post subject:

I have read it, but somehow i don't understand much
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 19 Oct 2010 01:31:38 pm    Post subject:

I think Hot_Dog tried to remedy that issue with his release of tutorials. I know they are at www.omnimaga.org but they are undergoing a hosting change and I cant see anything yet. But you might be able to check them out. I'll post a link as soon as I can get into their forum.

edit:
I got in using a proxy, here is the link to them. Caution though they are a beta release.
Click Here
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