This is probably not correct, and I need an expert to explain this.

I cannot use draw commands while anything drawn by xlib is on the screen or the xlib-drawn things will go away. The way it looks is as if xlib has it's own screen. So when you use draw commands, it switches back to the graph screen, thus making the xlib screen "disappear".

Am I right? And if so, is there a way around this, as in merging the two screens to have both xlib and draw commands show at the same time?

Post if you need a screenshot

Oh, and sorry if I sound noobish, but I'm testing out xlib for the first time.
xXEpicxXXxFailXx wrote:
[...]
Am I right? And if so, is there a way around this, as in merging the two screens to have both xlib and draw commands show at the same time?[...]
You are correct, and there is indeed a way around it. If you use one of the commands to update the LCD (cf. http://dcs.cemetech.net/index.php?title=Third-Party_BASIC_Libraries ), then you will be able to use TI-OS drawing commands. Note that the reverse is generally not possible (TI-OS drawing, then XLib drawing). For example, you could draw with XLib, or of course the DCS implementation thereof, then call real(6), then draw with TI-OS commands.
Hey, hey! Nice. Thanks yet again, Kerm. Slowly but surely, I am getting better.
xXEpicxXXxFailXx wrote:
Hey, hey! Nice. Thanks yet again, Kerm. Slowly but surely, I am getting better.
Glad to hear it. Smile Let me know if this works. On a related note, would it be worthwhile for me to build a routine that does the opposite (copies the LCD to the graph buffer, so you could use TI-OS commands followed by XLib commands)?
calcdude84se wrote:
Hm, it sounds like xLib draws directly to the screen... I haven't used xLib, so there may be an option to draw to the buffer.
No, you have it backwards. XLib / Celtic / Doors CS always draw to the graph buffer, then copy it to the LCD all at once. The TI-OS often draws solely to the LCD and doesn't bother with the graph buffer.
calcdude84se wrote:
Explanation: (this'll also explain my above comment)
In the TI-83+ series, the LCD is not mapped to a RAM area, so the screen has to be updated separately from the area that contains its contents. In BASIC, when you execute a drawing command, the buffer (that's what this area is called) is updated to reflect the command, and then the entire buffer is copied to the LCD.
What's happening here is that xLib is drawing directly to the LCD, which means when you execute a normal BASIC drawing command, the buffer's contents overwrite what's on the screen and hasn't been saved to the buffer. The resolution to this would be to use the versions of the commands that draw to the buffer, and then execute the command to copy the buffer to the LCD (this has to be done manually in xLib, and this is mainly for reasons of speed. It is much slower to do something like "draw sprite, update LCD, repeat" than "draw sprite, draw sprite... update LCD")
Again, you have it correct except backwards. The TI-OS doesn't use the buffer, while XLib/Celtic/DCS do.
Worthwhile... I'd say. It sounds like it would be useful for a lot of people.

I'm trying the xlib then draw out now...

EDIT: Hmm.... seems it yields the same results... Hate to be a pest, but am I doing it right?

1. xlib sprite drawing
2. real(6
3. text(1,1,"blah blah

All this does is display the text, but it does flicker the sprites right before.
Can you specify how you're doing the Xlib sprite drawing? Are you using ULCD = 0 or 1 for the last argument?
KermMartian wrote:
...Are you using ULCD = 0 or 1 for the last argument?


1 for all of them (there are 3).
xXEpicxXXxFailXx wrote:
KermMartian wrote:
...Are you using ULCD = 0 or 1 for the last argument?


1 for all of them (there are 3).
What if you do 0 for all of them, followed by real(6)? I'll do a bit of investigation into this myself, as well.
Sorry for the delay, had to run to the store.

Tried it, same result, but quicker flicker (since it draws all at once, eh?).

Also tried other methods, like saving the xlib stuff to a pic, but the pic turns out blank, again showing it is separate from the graph buffer.
xXEpicxXXxFailXx wrote:
Sorry for the delay, had to run to the store.

Tried it, same result, but quicker flicker (since it draws all at once, eh?).

Also tried other methods, like saving the xlib stuff to a pic, but the pic turns out blank, again showing it is separate from the graph buffer.
Just for the sake of confirming that what I think is going on is indeed going on, how about Text(, sprites, then real(6)?
Hmm... This actually has a bit of effect. This keeps the text, and it is overwritten by the sprites. Using my small knowledge of xlib, I changed the drawing style to AND so it wouldn't overwrite, but then I got an error.

I'm gonna look more at this in a bit, I'm starving and am going to walk to McDonalds or something...

EDIT: After a hardy meal Just Joking and a quick review of code showed the error was a parenthesis where a comma should be. This is the final code setup.

1.Text
2.xlib with AND parameters, no update LCD
3.Real(6)

A quick run shows this works. Thanks for all the help, Kerm.

Maybe if I can get Xlib and the DCS libs down I will enter the contest. But that seems like a longshot. Thanks again.
Excellent, glad you got it. Smile I'm quite surprised that that worked, though; I'll have to look into this more.
  
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
Page 1 of 1
» 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

 

Advertisement