Author Topic: Ever corrupt your archive?  (Read 6948 times)

0 Members and 1 Guest are viewing this topic.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Ever corrupt your archive?
« on: July 25, 2011, 10:08:06 pm »
New Version down below

I've seen way to many people getting their archives corrupted and losing all of their hard work lately, so I figured it's time for a solution.

Normally when your archive is corrupted, you can't boot your calculator. The only way to do it is to hold CLEAR and turn it on. The problem though is that all of your programs in the archive will not be listed in the program menu, which means that they can't be sent to your computer. The only way to make them show up is to ram clear, but that will crash since your archive is corrupted.

So, what I did was to make a program that parses the archive and rebuilds the vat. I tried to cover every possible way that would make the calculator crash, so this should work every time. Then once your programs are listed on your calculator, you can send them to your computer and clear mem, fixing all of your problems.



The steps to make this work are pretty easy:
1. Clear Ram while holding clear
2. Send this program
3. Run it with Asm(
4. Send all your variables back to your computer
5. Clear Mem

Here are the errors that I protect against:
  • Oversized arc header size
  • Undersized arc header size
  • Garbage archive data
  • Programs that cross sectors
  • Zero length names
  • Names longer than 8


I think these are really the only things that can go wrong with an archive entry, if anyone thinks of any others, tell me. One of the big ways I protect against random garbage is by only accepting appVars, programs, protected programs, and groups. It is highly unlikely that a random archive garbage will claim to be one of those variables as well as having a names that is between 1 and 8 characters.

Here's the program with the source, the more people who look at the source, the more holes in it we can find, so look at it. ;D
« Last Edit: August 12, 2011, 05:21:13 pm by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: Every corrupt your archive?
« Reply #1 on: July 25, 2011, 10:11:00 pm »
cool I hate when my archiv is corrupted
This used to contain a signature.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Ever corrupt your archive?
« Reply #2 on: July 25, 2011, 11:19:19 pm »
Awesome!  Great job, thepenguin, on what I'm sure will become a community-wide tool.  Thanks. :D

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Ever corrupt your archive?
« Reply #3 on: July 25, 2011, 11:21:17 pm »
OH COME ON, IF YOU HAD TOLD ME THIS EARLIER I WOULDN'T HAVE TO HAD DONE A FULL MEM RESET WITHOUT BACKUPS ><
In-progress: Graviter (...)

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Ever corrupt your archive?
« Reply #4 on: July 25, 2011, 11:22:23 pm »
OH COME ON, IF YOU HAD TOLD ME THIS EARLIER I WOULDN'T HAVE TO HAD DONE A FULL MEM RESET WITHOUT BACKUPS ><

Don't worry, I only made it a few hours ago. It wasn't around then.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Ever corrupt your archive?
« Reply #5 on: July 26, 2011, 01:28:25 am »
On a semi related topic: Nothing happens to me when I turn on while holding clear.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Ever corrupt your archive?
« Reply #6 on: July 26, 2011, 08:12:21 am »
mrmprog, you have to be rather quick about it. What it does is stop the TI-OS from parsing the Archive, so you should not see anything that is archived except for apps, which are different.
thepenguin, the next logical step would be to allow the Archive to be rebuilt on-calc. A lot of work, perhaps, but last I checked I thought we had good documentation on the archive format.
« Last Edit: July 26, 2011, 08:12:30 am by calcdude84se »
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline p2

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 849
  • Rating: +51/-11
  • I'm back :)
    • View Profile
Re: Ever corrupt your archive?
« Reply #7 on: July 26, 2011, 09:01:27 am »
great tool!
Spoiler For thepenguin:
I havehad more Programs than you  ;D (before I had to make an archieve clear) :P
*insert supercool signature*

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Ever corrupt your archive?
« Reply #8 on: July 26, 2011, 10:31:57 am »
Calcdude, archive format is simple. [Flag] | [Size low] | [Size high] | [Vat header ...] | [program data ...] But I do agree, I need to figure out how to fix the errors. That would be a bit tougher though :) (Manual garbage collect)

Edit:
On a semi related topic: Nothing happens to me when I turn on while holding clear.

Clear ram while holding CLEAR. Not just OFF/ON.
« Last Edit: July 26, 2011, 10:41:30 am by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: Ever corrupt your archive?
« Reply #9 on: July 26, 2011, 11:36:18 am »
Corrupted Archive gets really annoying, glad there is now a solution (other than deleting everything)! :D

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Ever corrupt your archive?
« Reply #10 on: August 12, 2011, 05:18:57 pm »
Today I realized that actually fixing the archive wouldn't really be that difficult, so I did it.

Here is the new version, you can run it whenever you feel like it. It will manually garbage collect, and then clear ram, when your calculator turns back on, it will be good as new.

Uses:
  • Uncorrupting archive
  • Removing random junk pages
  • Garbage collecting
  • Clearing ram


If you run this on your real calculator, (especially after messing with axe 1.0.0 or 1.0.1), you might actually gain 64KB or flash back, which is from those random junk pages that the regular garbage collect routine doesn't delete.

Edit:
   I hate it when I forget to attach it.
« Last Edit: August 12, 2011, 05:20:19 pm by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

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: Ever corrupt your archive?
« Reply #11 on: August 14, 2011, 11:54:12 am »
Wow. It's amazing how you pop in once in a while with an epic new program.
« Last Edit: August 14, 2011, 11:54:20 am by Deep Thought »




Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Ever corrupt your archive?
« Reply #12 on: August 14, 2011, 12:12:46 pm »
What is this wizardry?!
How does it work?

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: Ever corrupt your archive?
« Reply #13 on: August 14, 2011, 12:22:01 pm »
Well, as you said, it is magic...




Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: Ever corrupt your archive?
« Reply #14 on: August 14, 2011, 04:45:08 pm »
Haha. I've been meaning to write something like that for a long time. I wanted to use the extra 96 K of RAM to speed up garbage collection, but after the whole thing with TI trying to save a negligible amount of money by getting rid of most of the extra RAM, I never really felt like it.
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC