Author Topic: store arbitrary buffers to L3 and L6?  (Read 2834 times)

0 Members and 1 Guest are viewing this topic.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
store arbitrary buffers to L3 and L6?
« 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?
« Last Edit: April 30, 2011, 01:41:13 pm by willrandship »

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: store arbitrary buffers to L3 and L6?
« Reply #1 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)


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: store arbitrary buffers to L3 and L6?
« Reply #2 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!
« Last Edit: April 30, 2011, 02:04:50 pm by willrandship »

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: store arbitrary buffers to L3 and L6?
« Reply #3 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).