Author Topic: Find 768 bytes of screen  (Read 5644 times)

0 Members and 1 Guest are viewing this topic.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Find 768 bytes of screen
« 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?

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Find 768 bytes of screen
« Reply #1 on: October 03, 2010, 11:29:26 am »
L3 for back buffer
L6 for main buffer
« Last Edit: October 03, 2010, 11:29:38 am by happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

_player1537

  • Guest
Re: Find 768 bytes of screen
« Reply #2 on: October 03, 2010, 11:30:08 am »
L6 is gbuf, L3 is appbackupscreen (or the backbuffer)

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Find 768 bytes of screen
« Reply #3 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)
???

_player1537

  • Guest
Re: Find 768 bytes of screen
« Reply #4 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]
« Last Edit: October 03, 2010, 11:37:31 am by _player1537 »

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Find 768 bytes of screen
« Reply #5 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
« Last Edit: October 03, 2010, 11:42:30 am by Runer112 »

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Find 768 bytes of screen
« Reply #6 on: October 03, 2010, 11:46:46 am »
look at this maybe,

School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Find 768 bytes of screen
« Reply #7 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?
« Last Edit: October 03, 2010, 12:13:27 pm by Runer112 »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Find 768 bytes of screen
« Reply #8 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

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Find 768 bytes of screen
« Reply #9 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....
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Find 768 bytes of screen
« Reply #10 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.
« Last Edit: October 03, 2010, 05:04:43 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Find 768 bytes of screen
« Reply #11 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.