Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: ACagliano on October 03, 2010, 11:28:41 am

Title: Find 768 bytes of screen
Post by: ACagliano on October 03, 2010, 11:28:41 am
I need to find the area of memory that contain the SCREEN display (KermM says its gbuf). Where is it in Axe? And how do I access it in Axe?
Title: Re: Find 768 bytes of screen
Post by: Happybobjr on October 03, 2010, 11:29:26 am
L3 for back buffer
L6 for main buffer
Title: Re: Find 768 bytes of screen
Post by: _player1537 on October 03, 2010, 11:30:08 am
L6 is gbuf, L3 is appbackupscreen (or the backbuffer)
Title: Re: Find 768 bytes of screen
Post by: ACagliano on October 03, 2010, 11:32:57 am
So, if I want to read what is on the screen and store the data to an appvar, pointed to by P, I would do

conj(L6,P,768)

Right?

And what should the bitmap command say when I do to display it from the appvar?

conj(P,L6,768
Bitmap(X,Y,L6)
???
Title: Re: Find 768 bytes of screen
Post by: _player1537 on October 03, 2010, 11:36:50 am
Personally I don't use copy...

I would do:
Code: [Select]
For(A,0,767
{L6+A}->{P+A}
End[code]

and to copy to the screen (I don't use bitmap either >.>)
[code]Fpr(A,0,767
{P+A}->{L6+A}
End
DispGraph
[/code][/code]
Title: Re: Find 768 bytes of screen
Post by: Runer112 on October 03, 2010, 11:39:33 am
Umm, there's no reason not to use copy, it's much faster and much smaller than looping through the bytes manually. To copy the screen to a 768-byte appvar starting at P, do this:
Code: [Select]
conj(L₆,P,768)
And to copy this back to the screen, just reverse it (remember to update the display though):
Code: [Select]
conj(P,L₆,768)
DispGraph
Title: Re: Find 768 bytes of screen
Post by: Happybobjr on October 03, 2010, 11:46:46 am
look at this maybe,

Title: Re: Find 768 bytes of screen
Post by: Runer112 on October 03, 2010, 12:12:17 pm
look at this maybe,



Why are you copying random bytes of RAM to the screen? (Not really randomly chosen, but arbitrarily chosen bytes that have no practical meaning) And why one byte at a time?
Title: Re: Find 768 bytes of screen
Post by: DJ Omnimaga on October 03, 2010, 01:07:49 pm
I would use copy personally, it's much faster. If you absolutely don't want to use copy, though, then don't update the LCD every few bytes like in http://www.omnimaga.org/index.php?action=dlattach;topic=4688.0;attach=3608
Title: Re: Find 768 bytes of screen
Post by: Happybobjr on October 03, 2010, 01:25:23 pm
look at this maybe,



Why are you copying random bytes of RAM to the screen? (Not really randomly chosen, but arbitrarily chosen bytes that have no practical meaning) And why one byte at a time?
1 at a time to slow everything down, it was supposed to show how what ever value goes in that spot will output....
Title: Re: Find 768 bytes of screen
Post by: Quigibo on October 03, 2010, 05:04:31 pm
To copy a appvar's picture to the graph buffer, yes you would do:
Code: [Select]
conj(P,L6,768)
To display it, you simply use DispGraph.  That's what DispGraph does, it just copies the main buffer to the LCD.  No need to bitmap anything.

Alternatively, if you just need to show a picture and don't need to actually copy it to the buffer, you can just do this instead:
Code: [Select]
P->DispGraph
That will copy the 768 bytes in P to the LCD directly and not touch any of the buffers.
Title: Re: Find 768 bytes of screen
Post by: Deep Toaster on October 03, 2010, 05:51:07 pm
Personally I don't use copy...

I would do:
Code: [Select]
For(A,0,767
{L6+A}->{P+A}
End[code]

and to copy to the screen (I don't use bitmap either >.>)
[code]Fpr(A,0,767
{P+A}->{L6+A}
End
DispGraph
[/code][/code]

Copy is much faster because it doesn't actually update RAM just for a counter. It's just like the reason why TI-BASIC is so slow: each command updates at least 11 bytes of RAM, whereas Axe could do it with just 2.