Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: willrandship on April 30, 2011, 01:37:49 pm

Title: store arbitrary buffers to L3 and L6?
Post by: willrandship on April 30, 2011, 01:37:49 pm
In a cellular automata program I'm making, I need two extra buffers to store the next generation in, so I did this:

Zeros(768)->BB (BackBuffer)
zeros(768)->FB (Frontbuffer)

and for the commands I simply draw to those instead of L3 and L6.

However, once it's finished updating, I need a way to dump FB into L6 (that's front, right?) and BB into L3.

The only way I can figure to do it is BB->DispGraph:StoreGDB:StorePic (BB->screen->L6->L3) and then FB->Dispgraph:StoreGDB but that's two whole frames of semi-garbage I don't want. Any help?

And, it's not conway's, it has 4 cell states so I need the greyscale.


Edit: BTW, BB->L6 gives a bad symbol error, and it would only do the first byte anyways, right?
Title: Re: store arbitrary buffers to L3 and L6?
Post by: FinaleTI on April 30, 2011, 01:44:16 pm
Try this:
Code: [Select]
Zeros(768)->GDB0BB
Zeros(768)->GDB0FB

...code...

Copy(GDB0BB,L3,768)
Copy(GDB0FB,L6,768)
Title: Re: store arbitrary buffers to L3 and L6?
Post by: willrandship on April 30, 2011, 01:49:17 pm
Ooh, that is nice! I completely forgot about the copy command! Thanks!

Now all I have left is to work out how to change what cells are on the screen, with user input, but that should be pretty quick!

Oh, do interrupts work during getkeyr?

Also, any way to make a compiled axe prog read from a Pic in RAM? as in, not [Picvar] since that incorporates it on compiling.

Edit: WOAH! weird crash! My nspire is still running, but it has corrupted pixels in the top of the emu, in the grey area! (OS 1.4) And they come back when I turn the emu off and on again!

Edit2: Gone after a full reboot, but they come back again if I rerun the prog!
Title: Re: store arbitrary buffers to L3 and L6?
Post by: Deep Toaster on May 02, 2011, 09:48:43 am
Oh, do interrupts work during getkeyr?

I don't think so. I think it has an implied LnReg , but I'm not sure.

Also, any way to make a compiled axe prog read from a Pic in RAM? as in, not [Picvar] since that incorporates it on compiling.

GetCalc("Pic1") finds Pic1 and returns its pointer. It's organized the same as any other graph buffer, except it's 756 bytes (96x63) instead of 768 (96x64).