Found a bug with MirageOS (v1.2) where it glitches when renaming stuff. And so I did exactly what no one else would do: I played around with the bug until I got something more serious, and now I've corrupted my archive with no backups at all Sad

I can't boot my calculator anymore without using CLEAR+ON (it flashes a random screen for half a second, then disappears). If I disable the archive with that CLEAR thing, the calculator seems to work fine, so it's probably only some part of the archive that's corrupted, not the OS.

But I lost about 12 projects in group vars. Most of them are small, and I could probably get back to where I was in those projects in a few days, but Contra, XDE, PapiJump, and Ultimate Falldown were all really far in (Contra in particular already had a nearly complete engine with enemy AI and aiming that I'd just added in the past few days), and it would take a long time before I can get all of it coded again.

So here's my question: Anyone willing to give me directions on how to get as much of it back as I can? I've never really done anything with Flash before, except some simple reading. I haven't GarbageCollect'd or done anything else to my archive since the crash, so the data should still be there, but some of it's definitely corrupted. Thanks in advance for any info!
Try installing a third party OS (such as the one SirCmpwn gave to Raylin to fix his calc) and then reinstall the TIOS.
I guess the best thing to do would be to dump your Flash to a file on-comp and try to do some forensic analysis from there; the problem is that I don't know of any program available to do that. I'd try to sic BrandonW on this problem, though; he's the most likely to have a good answer.
KermMartian wrote:
I guess the best thing to do would be to dump your Flash to a file on-comp and try to do some forensic analysis from there; the problem is that I don't know of any program available to do that. I'd try to sic BrandonW on this problem, though; he's the most likely to have a good answer.


Yeah, I'll email/PM him when I have the time.

To dump my flash, can I just read it through port 6 to a RAM appvar one page at a time? That shouldn't change the flash at all, should it?
Port 6 just puts the page in flash in $4000-7FFF in memory, so you would have to make a short assembly program to make an appvar and copy $4000-$7FFF to an appvar.
Yep, that's what I was going to do, but wanted to check: It doesn't actually affect flash, does it?
I don't think it affects Flash.
souvik1997 wrote:
I don't think it affects Flash.
It doesn't modify Flash, no.
If your archive is corrupted to the point that the TI-OS cannot parse it (which seems to be the situation you're in since you can't boot without bypassing the parsing with ON+CLEAR), and you care about the contents, you need to dump the ROM.

Use TiLP to do this since it supports both I/O and direct USB cables.
DO NOT use rom8x -- this is NOT a real ROM dump, it's only a merging of your boot code (which we don't care about) and an 8XU from http://education.ti.com (which we don't care about).

Once you've done that and you have the ROM, you can pick apart that file later to get your data. To fix your calculator:

1. Intentionally corrupt your OS. The quick and dirty way would be to use ON+DEL and start an OS transfer, then pull the cable in the middle of the transfer.

2. Once the OS is corrupted, you'll be stuck at the "Waiting...Please install operating system now." screen when turning the calculator on. After turning it on, press [MODE]. It will display "Testing flash" (or "ID FAILED" and then "Testing flash" -- doesn't matter) (note that on a certificate-corrupted calculator, this won't work because it tries to retrieve your calc ID, which will fail on a severely corrupted certificate (same reason why it bricks)).

3. It should keep displaying periods while it erases the entire Flash chip (excepting the certificate and boot code, of course). I can't remember what it displays next, but once it does something new, you can pull a battery.

4. Turn the calculator back on and re-install the OS.

5. Once you're back into the TI-OS, the entire archive should be completely empty. You may also notice that the Mem Mgmt/Del menu indicates more free archive memory than you're supposed to have. This is because of a bug in the boot code self test (it didn't mark one of the Flash sectors as a swap sector). Do a full memory erase from the MEM RESET menu and I think that should take care of it.

6. Restore any programs or applications back to your calculator.

Now you just need to extract whatever programs and applications you want out of your ROM. Someone should probably write a program to do this for partially-corrupted ROMs. It would take too long to explain the contents of the entire ROM, so you should probably just upload it so one of us can rip things out of it for you if you don't want to do it yourself.

Hope that helps.
Thanks BrandonW, I'll do that Neutral

Can I still dump my flash page by page and piece it together on a computer? I lost my link cable and now the only way for me to transfer things is to transfer a var to an 84+ so I can use the USB cable.

Also, if I do an OS transfer from another 83+ and break the link (1), it wouldn't crash the other calculator, would it? Not that it really matters. None of my friends would notice Very Happy
Thanks for that very thorough explanation, BrandonW. Smile
Hence the words under his name. I wonder how many calcs you've bricked so far Surprised
Deep Thought wrote:
Hence the words under his name. I wonder how many calcs you've bricked so far Surprised
He's never intentionally bricked a calculator as far as I know; they're too precious of a commodity. Smile For what it's worth, throwing together a little Python program to extract the variables from the archive of a ROM image would not be a very hard thing for me to do; if you get your ROM out, I might decide to spend a few hours doing that.
Thanks Kerm! I don't really know how vars are stored in flash.
Deep Thought wrote:
Thanks Kerm! I don't really know how vars are stored in flash.
It's quite straightforward really: a copy of their VAT entry, then the variable itself. It could be a bit harder if any of the corruption is in the VAT entry preceding variables, but as long as all the corruption is in the body of variables themselves (which sounds unlikely in this case) recovery of the existing variables is relatively trivial.
Oh, okay. What about groups, then? Probably harder to recover, I'd imagine Sad
Deep Thought wrote:
Oh, okay. What about groups, then? Probably harder to recover, I'd imagine Sad
They shouldn't be that much harder, since they have a meta-VAT header similar to that of a program; in such a program as I might be making, the hardest part would be expanding each of the sub-headers in the variables in the group file.
Would loading the ROM in WabbitEmu and exporting the groups work?
Wouldn't it still be corrupted, though?
Yeah, that's the problem, there's no way to know how bad the corruption is or what it's like. You might try to get smarter and look for sequences of bytes that have patterns, like a byte within 00h-7Fh (to indicate a page), then from 4000h-7FFFh (for archive) or 8000h-0FE6Eh (for RAM) variables, and then a byte to indicate filename length (between 1 and 8 ), then valid ASCII characters, etc. (I'm sure you get what I mean.)

I do have one calculator that I bricked intentionally (an 83+) to see if I could unbrick it, which I've yet to do.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement