Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: c4ooo on March 08, 2015, 08:46:44 pm

Title: If i know the flash page of a file, how can i read/write data to it.
Post by: c4ooo on March 08, 2015, 08:46:44 pm
If i know the flash page of a file, how can a read/write to it without using Y1 or GetCalc()?
Title: Re: If i know the flash page of a file, how can i read/write data to it.
Post by: Runer112 on March 08, 2015, 09:04:29 pm
In Axe, you basically can't. There's a reason the Y1-Y0 "file" system exists, after all. :P Why would you be trying to avoid them?

Also, if you are going to use them, note that you can read and copy from pointers to archived data, but nothing else. For instance, you can't directly draw a sprite because the sprite drawing routine doesn't "know" how to read archived data, which isn't nearly as straightforward to read as data in RAM. And you can't write to a pointer to archived data simply because that's a limitation of the hardware. Writes to flash memory have to be done in a very special manner which is far too expensive and complicated to do arbitrarily.
Title: Re: If i know the flash page of a file, how can i read/write data to it.
Post by: c4ooo on March 09, 2015, 08:56:24 pm
Why would you be trying to avoid them?

What if ime reading stuff out of the VAT? It would be much easier to just read the flash page (which is stored in the VAT) then getCalking that var.  8)
Title: Re: If i know the flash page of a file, how can i read/write data to it.
Post by: Runer112 on March 09, 2015, 09:26:29 pm
I guess that does make it a bit trickier. But it would still definitely be harder to implement custom archived data reading code than to just finagle the archived data pointer into a Y1-Y0 file pointer. It's a bit redundant, but I'd suggest simply reading the variable's name and using the archived file variant of GetCalc() on it. That has all the code needed to convert the page and pointer in the VAT into a file pointer that Axe understands, which isn't exactly a simple conversion to make.
Title: Re: If i know the flash page of a file, how can i read/write data to it.
Post by: c4ooo on March 10, 2015, 06:32:08 am
As you may have seen i have the tendency to do redounded thing  ;)