Omnimaga

Omnimaga => News => Topic started by: thepenguin77 on November 10, 2012, 10:06:59 pm

Title: Faster Flash Access for the 83+/84+
Post by: thepenguin77 on November 10, 2012, 10:06:59 pm
So I was in an OS-patching mood, and speeding up flash access was an idea I've had for about a year. After you apply this patch, reading data from flash (unarchiving) will take 1/3 as long as it normally would and writing data to flash (archiving) will take 2/3 as long as it normally would. These effects will take place across the entire OS (including basic and assembly programs).

As always, I made a patch for OS's 1.19_BE, 1.19_SE, 2.43, 2.53, and 2.55 (yes, the 83+BE and 83+SE require different patches). I was lazy and didn't include any kind of progress bar, so, you'll just have to wait in fear. I feel bad for the 83+BE users though because they have to wait far longer than what is acceptable.

Before:
After:
(http://img.removedfromgame.com/imgs/archive_slow.gif)(http://img.removedfromgame.com/imgs/archive_fast.gif)


As far as I can tell, this mod is stable. I currently have it installed on my calculator and the only thing I've noticed is that stuff basically unarchives instantly. I didn't include an option to unpatch your calculator this time since an unpatch isn't really feasible (one part of the patching involves a find/replace of a certain OS call), but that's ok, because if you are unhappy with this mod, you'll probably need an OS reinstall anyways ;D

Lastly, I'd like to mention that there are a few things this won't speed up. Most notably: Axe when it writes an app, OS modding programs, and receiving OS's. All of these tasks still use the old WriteFlash routine and there's nothing I can do to change that (besides mod the boot code (and I'm not going to)).

Oh, and as far as compatibility is concerned. Both version of the universal flash unlock still work (that was annoying) and this patch fixes the 2.55 fraction glitch (in a different way).

So, install and enjoy your faster calculator.

Edit:
    I cannot forget Runer112 who optimized the new _flashToRam routine and cut off like 20 bytes. So he gets credit too.

Edit2:
   This program takes a long time to run and gives no display of progress, give it a solid 3 minutes before you assume it crashed.
Title: Re: Faster Flash Access for the 83+/84+
Post by: DJ Omnimaga on November 10, 2012, 10:19:12 pm
I think The Reign of Legends 2 fans will love this... O.O

That seems really cool. I might give it a try at one point. By the way you should really bundle your patches together or in packages (eg those together and your other patches in another package) and put them in Omni download section or add a link to them there. It would give them more visibility.

Does that speed up Garbage Collecting too?
Title: Re: Faster Flash Access for the 83+/84+
Post by: thepenguin77 on November 10, 2012, 10:20:38 pm
I think The Reign of Legends 2 fans will love this... O.O

That seems really cool. I might give it a try at one point. By the way you should really bundle your patches together or in packages (eg those together and your other patches in another package) and put them in Omni download section or add a link to them there. It would give them more visibility.

Does that speed up Garbage Collecting too?

That's going to be a mega .zip file ;D

And yes, Garbage Collection should take around 2/3 the normal amount of time.
Title: Re: Faster Flash Access for the 83+/84+
Post by: Yeong on November 10, 2012, 10:22:52 pm
Wow those patches are rolling! ;D
Nice to see yet another one.
Title: Re: Faster Flash Access for the 83+/84+
Post by: DJ Omnimaga on November 10, 2012, 10:27:28 pm
I think The Reign of Legends 2 fans will love this... O.O

That seems really cool. I might give it a try at one point. By the way you should really bundle your patches together or in packages (eg those together and your other patches in another package) and put them in Omni download section or add a link to them there. It would give them more visibility.

Does that speed up Garbage Collecting too?

That's going to be a mega .zip file ;D

And yes, Garbage Collection should take around 2/3 the normal amount of time.
Actually I would keep the Faster FLash ones in one zip file/separate file and only put the OS patches that fix bugs or compatibility issues together (along with the OS 2.71MP joke)

Also I think this pretty much deserves news. What do others think? (It would be even greater if there were two ROL2 screenshots side by side, one with the patch and the one without it)
Title: Re: Faster Flash Access for the 83+/84+
Post by: squidgetx on November 10, 2012, 10:44:47 pm
Sweetness, downloading this now. Awesome work penguin :D

Edit: Installed, seems to work very well indeed. It's especially nice using it in tandem with edit-from-archive.
Title: Re: Faster Flash Access for the 83+/84+
Post by: DJ Omnimaga on November 10, 2012, 11:27:38 pm
You might want to specify in red/bold that it will take a long while to load (it took me 1 minute on WabbitEmu), so people don't think their calc crashed and remove a battery :P
Title: Re: Faster Flash Access for the 83+/84+
Post by: TexasInstruments84 on November 10, 2012, 11:30:07 pm
Sorry for being a noob, but how do I install it on my calc?
Title: Re: Faster Flash Access for the 83+/84+
Post by: DJ Omnimaga on November 10, 2012, 11:51:07 pm
Just send it with Ti-Connect or TiLP then run it with Asm(prgmFSTFLASH
Title: Re: Faster Flash Access for the 83+/84+
Post by: TexasInstruments84 on November 10, 2012, 11:59:24 pm
Just send it with Ti-Connect or TiLP then run it with Asm(prgmFSTFLASH

Is the program supposed to be in the RAM? I get "ERR:ARCHIVED"
Title: Re: Faster Flash Access for the 83+/84+
Post by: Happybobjr on November 11, 2012, 12:11:13 am
Ya, it needs to be in RAM.  Without special programs/apps like Doors, you need to run them in RAM.
Title: Re: Faster Flash Access for the 83+/84+
Post by: TIfanx1999 on November 11, 2012, 12:19:11 am
Wow, this is pretty fantastic!  Great work once again! :)
Title: Re: Faster Flash Access for the 83+/84+
Post by: TexasInstruments84 on November 11, 2012, 12:39:47 am
After I ran it on my TI-84+ SE (2.55MP), all of the buttons stopped functioning. I turned it on holding clear to clear the RAM, and it worked again. Did I get the wrong file? I downloaded "fstFlash_255.8xp". Or maybe I have to wait a minute after I turn it on?
Title: Re: Faster Flash Access for the 83+/84+
Post by: Hayleia on November 11, 2012, 02:02:29 am
After I ran it on my TI-84+ SE (2.55MP), all of the buttons stopped functioning. I turned it on holding clear to clear the RAM, and it worked again. Did I get the wrong file? I downloaded "fstFlash_255.8xp". Or maybe I have to wait a minute after I turn it on?
It depends on the OS version you have on your calc. The fstFlash_255.8xp is for OS 2.55.
But I think that it is normal that all buttons stop functionning during the time the patch installs itself ;)
Title: Re: Faster Flash Access for the 83+/84+
Post by: Sorunome on November 11, 2012, 03:09:37 am
Yeah, just wait a few minuets!

And this is sounding epic penguin! :D
Title: Re: Faster Flash Access for the 83+/84+
Post by: Lionel Debroux on November 11, 2012, 03:27:56 am
Pretty good stuff :)
I totally support patching TI's OS in order to make it less buggy, faster and more featureful ^^

If the 84+ C (SE) is to use a Z80, and its OS is to be based on the current OS and to be executed without emulation (which we don't know...), TI should fold in, or get inspiration from, third-party patches into the OS.
Title: Re: Faster Flash Access for the 83+/84+
Post by: DrDnar on November 11, 2012, 04:06:40 am
I had not realized that the combination of b_call lookup and copying the routine to RAM repeatedly was such a major bottleneck. Have you tried placing a counter in the write and erase routines and timing how long such operations actually take?

I notice you don't try to use the accelerated one-command-per-write mode. I wonder if the autoselect commands could identify whether the chip supports that.

I wrote the Wiki page (http://wikiti.brandonw.net/index.php?title=83Plus:OS:Raw_Flash_Commands) on raw flash access.
Title: Re: Faster Flash Access for the 83+/84+
Post by: Adriweb on November 11, 2012, 06:03:17 am
Awesome, really :)

(TI should look at your patch and make it official :P)
Title: Re: Faster Flash Access for the 83+/84+
Post by: Lionel Debroux on November 11, 2012, 06:08:40 am
They should, but so far, they even failed to make official the unofficial bugfixes... so optimizations are in another league entirely ;)
Title: Re: Faster Flash Access for the 83+/84+
Post by: TexasInstruments84 on November 11, 2012, 08:19:06 am
Alright, I just re-installed it and got the same error (after restoring the OS from a previous attempt). I waited a minute after installing it (it said DONE after executing), and a minute after booting. I still can't get the keys to respond. Could it be an issue with my apps?

Edit: could it be from my custom picture on zstart?
Title: Re: Faster Flash Access for the 83+/84+
Post by: aeTIos on November 11, 2012, 08:21:28 am
Does this mean archiving gets 3 times as fast?
And Texas, no I don't think this has to do with zstart since that's also written by thepenguin :)
Title: Re: Faster Flash Access for the 83+/84+
Post by: dinosteven on November 11, 2012, 11:39:44 am
Is grouping and ungrouping faster?
Title: Re: Faster Flash Access for the 83+/84+
Post by: Hayleia on November 11, 2012, 02:04:44 pm
Alright, I just re-installed it and got the same error (after restoring the OS from a previous attempt). I waited a minute after installing it (it said DONE after executing), and a minute after booting. I still can't get the keys to respond. Could it be an issue with my apps?

Edit: could it be from my custom picture on zstart?
Are you sure that you used the version that goes with your OS ?
It worked fine for me on OS 2.43.
Title: Re: Faster Flash Access for the 83+/84+
Post by: TexasInstruments84 on November 11, 2012, 03:19:09 pm
Yup, I'm on 2.55MP and got the 2.55 file. Does anyone have it working on this version?
Title: Re: Faster Flash Access for the 83+/84+
Post by: squidgetx on November 11, 2012, 03:24:40 pm
I have a possible bug report. Since installing this morning my calc has been behaving rather oddly. I've been working on an axe project and using edit-from-archive and ON-ZOOM zstart features a lot, and suddenly (after the program crashed I think) the source axe file was filled with random tokens. This happened multiple times and eventually the dev cycle looped into restore axe backup, compile, archive source, run, executable crashed, go look at axe source, it's corrupted, restore axe backup. I tried restoring the OS, it went through the whole "Receiving...Operating System" dialog and then changed to "Waiting...Please Install Operating System." I then resent the OS (again) and now it's behaving perfectly normally. I have to do some stuff now, but when I have time I'll reapply the patch and see if I can duplicate the behavior.
Title: Re: Faster Flash Access for the 83+/84+
Post by: thepenguin77 on November 11, 2012, 04:04:53 pm
Are you sure that you used the version that goes with your OS ?

The program throws an error if you run it on the wrong calc.

Is grouping and ungrouping faster?

Yes

I have a possible bug report. Since installing this morning my calc has been behaving rather oddly. I've been working on an axe project and using edit-from-archive and ON-ZOOM zstart features a lot, and suddenly (after the program crashed I think) the source axe file was filled with random tokens. This happened multiple times and eventually the dev cycle looped into restore axe backup, compile, archive source, run, executable crashed, go look at axe source, it's corrupted, restore axe backup. I tried restoring the OS, it went through the whole "Receiving...Operating System" dialog and then changed to "Waiting...Please Install Operating System." I then resent the OS (again) and now it's behaving perfectly normally. I have to do some stuff now, but when I have time I'll reapply the patch and see if I can duplicate the behavior.

Which OS? I had to do this 5 times, so there's a chance I made a mistake in one of them.
Title: Re: Faster Flash Access for the 83+/84+
Post by: InternetCliche on November 11, 2012, 09:01:36 pm
I too am experiencing the whole "Buttons don't work" thing. OS 2.55MP, 84+. Happened only after i reinstalled zstart.
Title: Re: Faster Flash Access for the 83+/84+
Post by: TexasInstruments84 on November 11, 2012, 09:34:24 pm
I too am experiencing the whole "Buttons don't work" thing. OS 2.55MP, 84+. Happened only after i reinstalled zstart.

Finally, someone with the same problem! So you're saying the patch only works when zstart is not installed?
Title: Re: Faster Flash Access for the 83+/84+
Post by: DJ Omnimaga on November 11, 2012, 09:36:49 pm
Is the program dependent on specific hardware revisions by the way?

Also does the speed difference occurs only with very large files? I tried ROL2 with the patch on and could barely notice much difference. ??? However I was using an emulator. (Wabbitemu)
Title: Re: Faster Flash Access for the 83+/84+
Post by: thepenguin77 on November 11, 2012, 10:05:57 pm
I too am experiencing the whole "Buttons don't work" thing. OS 2.55MP, 84+. Happened only after i reinstalled zstart.

Oh, so I just tested it, and it apparently doesn't work when you combine zStart with MathPrint. The problem is definitely with zStart, but I have zero idea what would cause it. So try again with classic.


Is the program dependent on specific hardware revisions by the way?

Also does the speed difference occurs only with very large files? I tried ROL2 with the patch on and could barely notice much difference. ??? However I was using an emulator. (Wabbitemu)

It's not dependent on the hardware at all.

It works on files of all sizes, but the bigger the file, the more noticeable the change is.
Title: Re: Faster Flash Access for the 83+/84+
Post by: DJ Omnimaga on November 11, 2012, 10:44:01 pm
Ok I see. I was a bit worried in case there were stuff like how TI-Boy used to fail on newer hardware.
Title: Re: Faster Flash Access for the 83+/84+
Post by: squidgetx on November 12, 2012, 09:41:38 am
Which OS? I had to do this 5 times, so there's a chance I made a mistake in one of them.

2.43, 84+SE. I haven't had the chance to reapply the patch yet, but since resending the OS everything's been fine =/.
Title: Re: Faster Flash Access for the 83+/84+
Post by: Happybobjr on November 18, 2012, 11:55:24 am
in 2.55 it the calc crashes when opening mirageos and zstart in classic mode, and freezes in mathprint.

However, 2.55 is so buggy anyways, i'm not sure why i was using it.
Title: Re: Faster Flash Access for the 83+/84+
Post by: TexasInstruments84 on March 16, 2013, 06:09:23 pm
Looks like my calculator died. Doesn't recognize it through USB, so I can't restore it. Any solutions?

This is what it does when I hold clear and ON. It goes to this screen and becomes blank again. :[

And yes, I did use the correct version. I waited until the program finished (never did), crashed, and now it's dead.

(http://i.imgur.com/M8Cwhlz.jpg)
Title: Re: Faster Flash Access for the 83+/84+
Post by: tifreak on March 16, 2013, 06:26:45 pm
Pull a battery. Press and hold ON and DEL, then reinsert battery. It should ask for an OS at that point.
Title: Re: Faster Flash Access for the 83+/84+
Post by: TexasInstruments84 on March 16, 2013, 06:34:42 pm
Thanks for the help! Once it restores, I'm going to try to find a solution to the key response problem. I'll update this soon.

Update: looks like this program doesn't like zstart. I tried opening it but it just froze.
Title: Re: Faster Flash Access for the 83+/84+
Post by: Runer112 on September 08, 2013, 04:08:55 pm
I am now fairly sure that this patch has at least one negative side effect. I have reports from two users of this patch that, with it installed, scrolling to errors from Axe results in garbage being displayed, corruption of RAM, and possibly other issues (now that I'm testing it again in Wabbitemu, the OS will not boot after the issue occurs). After a short amount of testing, it appears that the error can be triggered not just by instant error scrolling from Axe, but also from DoorsCS. The OS version may or may not matter; both users who reported the issue use 2.43.
Title: Re: Faster Flash Access for the 83+/84+
Post by: Streetwalrus on September 09, 2013, 12:46:51 pm
Oooohh that's why. XD But I archive so often that this patch is pretty much a must for me. I hope it can be fixed though.
Title: Re: Faster Flash Access for the 83+/84+
Post by: Sorunome on September 09, 2013, 02:02:38 pm
i didn't experience any errors when i used that patch ???
Title: Re: Faster Flash Access for the 83+/84+
Post by: Eiyeron on September 09, 2013, 03:00:03 pm
Try making a syntax error in Axe, then savour the scroll...
Title: Re: Faster Flash Access for the 83+/84+
Post by: TIfanx1999 on September 09, 2013, 03:06:47 pm
Eiyeron: Was this what was causing your troubles? O_o
Title: Re: Faster Flash Access for the 83+/84+
Post by: Eiyeron on September 09, 2013, 03:09:32 pm
Stupid syntax error like Lbl function(), or unknown variables, like a uninit Pic007 for instance. Each error make me comes into Axe using zStart instant scoll-to-error, and persisted to use it, even when accessing on a flash program...
Title: Re: Faster Flash Access for the 83+/84+
Post by: DJ Omnimaga on September 10, 2013, 01:05:11 am
I personally avoided using goto error during Axe compiling, because in many cases it scrolled forever through garbage for me anyway, so I had the habit to just quit then go edit my program afterward. :P

I wonder what in the faster flash program could be causing the errors, though... ???
Title: Re: Faster Flash Access for the 83+/84+
Post by: Streetwalrus on September 10, 2013, 06:23:46 am
Maybe a weird combination because it happens with this +zStart.
Title: Re: Faster Flash Access for the 83+/84+
Post by: Sorunome on September 10, 2013, 07:45:50 am
I personally avoided using goto error during Axe compiling, because in many cases it scrolled forever through garbage for me anyway, so I had the habit to just quit then go edit my program afterward. :P
Same here :P
Quote
I wonder what in the faster flash program could be causing the errors, though... ???
Maybe a weird combination because it happens with this +zStart.
I used it with zstart (run on RAM clear) and axe and some other of thepengiuns OS mods.....no problems.
Title: Re: Faster Flash Access for the 83+/84+
Post by: thepenguin77 on September 10, 2013, 10:44:58 am
I am now fairly sure that this patch has at least one negative side effect. I have reports from two users of this patch that, with it installed, scrolling to errors from Axe results in garbage being displayed, corruption of RAM, and possibly other issues (now that I'm testing it again in Wabbitemu, the OS will not boot after the issue occurs). After a short amount of testing, it appears that the error can be triggered not just by instant error scrolling from Axe, but also from DoorsCS. The OS version may or may not matter; both users who reported the issue use 2.43.


I was pm'ing a guy for a while about stuff like this, and the best thing I can come up with is that this patch exceeds the maximum read/write speed of flash. He tried several different OS's and he always had the same problem. The only thing I could blame at that point was his hardware.
Title: Re: Faster Flash Access for the 83+/84+
Post by: Runer112 on September 10, 2013, 03:29:56 pm
I installed 2.43 and the fast flash mod on my 84+SE, and I could perfectly replicate the instant goto symptoms reported by the other two users of 2.43 and the fast flash mod. The issue seems to be specific to the 2.43 version of the patch.

Also, the fast flash mod seems to really conflict with zStart, at least on 84+ calculators. This often means that the OS will crash upon startup if run on RAM clears is enabled. If it isn't enabled, opening the zStart app will often either freeze, crash, or let you in only to reveal that the settings are mostly random garbage. This doesn't seem to be specific to any particular OS.


EDIT: And yes, I've been able to replicate both of these in Wabbitemu.
Title: Re: Faster Flash Access for the 83+/84+
Post by: Streetwalrus on September 10, 2013, 03:32:38 pm
Never had a corruption problem and this bug also happens in an emulator which should be more tolerant than HW. ???
Title: Re: Faster Flash Access for the 83+/84+
Post by: Streetwalrus on September 12, 2013, 04:24:58 pm
Update : I can confirm that resending an OS (2.43) and reapplying all my patches except this one fixes the issue with Axe.
Title: Re: Faster Flash Access for the 83+/84+
Post by: thepenguin77 on September 12, 2013, 04:27:07 pm
Update : I can confirm that resending an OS (2.43) and reapplying all my patches except this one fixes the issue with Axe.

Glad to hear. I'll have to figure out what's wrong.
Title: Re: Faster Flash Access for the 83+/84+
Post by: Streetwalrus on September 12, 2013, 04:29:52 pm
I also allows my calc to exit the Waiting for OS screen. :D Now I'll wait till you fix it before I reapply it.
Edit : I just made myself a nice signed 8xu with the patches I need. Pretty convenient, eh ?