I just recently figured this out, and it's so stupidly easy that I have to share it.
1. You're going to need dropbox. If you don't have it, install it. 2. Open an elevated command prompt. (Start > Programs > accessories > right click on Command Prompt > run as admin) 3. Determine the location of your calculator sources (For me it's "C:\asm\source") 4. Determine the location of your dropbox folder (For me it's "C:\users\brian\dropbox") 5. Decide on a name for your backup folder (I picked "C:\users\brian\dropbox\calc_src") 5. In command prompt, type mklink /j "backup_folder" "source_folder" I typed: mklink /j "C:\users\brian\dropbox\calc_src" "C:\asm\source"
And you're done!
What this does is it creates a symlink from your dropbox folder to your sources folder. Basically, dropbox thinks that your source folder is in the dropbox folder and keeps it up to date with the server. This means that all of your calculator sources will be no more than a few minutes out of date.
I had this idea because this morning, my friend's computer got completely wiped by a chinese virus. It's one of those things where you think it could never happen, but then it does.
Also, this won't work with google drive because it can't handle the symlinks.
A long time ago, I accidentally deleted the source to my Impossible Game with a batch file. Since I did it with a batch file, it didn't go to the recycle bin and was gone forever.
This is a backup technique that would have prevented that from happening. This won't protect you from hard drive crashes and the like, but it's so simple that you really have no reason not to do it.
Step 1: Make a folder somewhere far away from your sources folder My sources are C:\Asm\Sources so I made C:\Backups (a different drive would have been better, but oh well) Step 2: Edit your asm.bat (or whatever you use) to include this line to copy whatever source you are compiling into that folder Mine looks like this:
@echo off copy c:\asm\source\%1.z80 %1.z80 > nul copy %1.z80 c:\backups\%1.z80 > nul -- this is the new line spasm %1.z80 c:\asm\exec\%1.8xp del %1.z80 > nul time /T -- displays the current time, also a good idea
Done!
What this protects against:
Deleting a source file
Weird .bat file mistakes
Deleting your source folder (!)
Saving over your source file (as long as you don't assembling the new one)
What this doesn't protect against:
Deleting everything in the file, saving, assembling
Hard drive crashes
Losing your computer
So, while this isn't the most thorough option, it would have prevented me from losing my source.
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:
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
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.
Did you know that placing the maximum exponent at 10^99 was a completely arbitrary move by TI? In any case, I did, and I got rid of that limitation.
With this OS patch, your calculator can handle exponents from E-127 to E127.
I'm going to guess that TI added this limitation to keep up with their older calculators which only had room for a two digit number. They also probably kept it at two digits because they used a nice little hack to parse the numbers after the E token. But, in any case, I took off the bounds checking so that large numbers don't throw an ERR:OVERFLOW and modified the number parser to allow 3 digit numbers.
I made a patch for 1.19, 2.43, 2.53, and 2.55. The 2.55 is the ugliest of them all as I had to locate some code on page 00 (which could potentially mean compatibility issues with other patches), but they all work.
If you understand how TI-floats work, you might be wondering why I didn't allow E-128, and the reason for this is that there's a certain routine which could underflow back to E127, and that would just cause weird issues that I don't want to deal with. So E-127 is the limit.
I included the patcher with it's patch files if you want to see what is going on.
Edit: And like always, there's an option to undo the patch.
mkdir summation del summation\summation.txt for %%f in (*.z80) do type "%%f" >> summation\summation.txt
A folder called summation will appear and inside will be all of your programs all joined together.
Spoiler For tweaks:
If you don't use the file extension ".z80", you can change that part to ".asm", or whatever you use. If you use all kinds of extensions, you can make it ".*", but that will try to sum all files of all extensions, including .exe's and whatnot.
If you have your source in folders, you can sum that too, but you're going to need to include each folder yourself. The code for a folder is for %%f in (folder\*.z80) do type "%%f" >> summation\summation.txt
Spoiler For my batch file:
mkdir summation del summation\summation.txt for %%f in (*.z80) do type "%%f" >> summation\summation.txt for %%f in (blue2\*.z80) do type "%%f" >> summation\summation.txt for %%f in (flashCards\*.z80) do type "%%f" >> summation\summation.txt for %%f in (missile\*.z80) do type "%%f" >> summation\summation.txt for %%f in (osPatcher\*.z80) do type "%%f" >> summation\summation.txt for %%f in (zrox\*.z80) do type "%%f" >> summation\summation.txt for %%f in (zstart\*.z80) do type "%%f" >> summation\summation.txt
My summation.txt had 3,072,590 characters and was 234,453 lines long. How long is yours?
About 5 days ago, I was talking on omnomIRC when it froze, I refreshed the page and the framework of omnomIRC loaded, but I don't think it ever connected to anything. It has loaded the same way ever since. (I cleared my cache too)
Now this might be a rather simple problem, but I don't think it is. I'm asking this partially because I'm too lazy to figure it out right now, and also because I feel it will give people an opportunity to think. (This might even end up requiring a program to solve)
So, no one likes to carry around change (coins) and my question is, what coins should you enter a store with so that sum of the number of coins you enter a store and leave a store with is at a minimum?
The general idea here is that you basically want to carry the least amount of change. So, the way this works, is you pick E number of coins to enter with, after buying your items (which have random number of cents) you leave with L number of coins. You want to minimize L + E.
Rules:
We're using American coins, so the choices are: penny - .01, nickel - .05, dime - .10, quarter - .25 (no half dollars, too rare )
The number of cents your purchase costs is random (So, a purchase would cost some dollar amount + [0 - 99] cents)
You receive the minimum number of coins from the cashier ($.90 is not 9 dimes)
Have at it. You'll of course have to provide some sort of justification for your answer.
Spoiler For accepted answer:
Well, it looks like runer had it right from the start. Carrying 0 coins really is the best option.
Whatever the cost of your purchase is and whatever coins you have, you can ensure you leave with the minimum amount of change possible by giving the vendor all of your change. Whatever coins properly contribute to the payment, the vendor will keep; the coins that do not will be returned to you. Since the cents amount of the purchase is an equally-distributed random number, subtracting your constant amount of change from this will result in another equally-distributed random number (mod 100). Whatever amount of change you contribute, the vendor will always have to return to you coins that sum to an equally-distributed random amount of cents from 0-99.
You cannot limit the amount of coins you end with, so the optimal solution is simply to limit the amount of coins you begin with.
And with 2 brute force checks to back this, I'm happy. It looks like I've been doing it right all along.
Hey everybody, Sorunome here. I converted this table into a more machine-readable format and made it way easier to search by address or by ID, so e.g. when searching for 8005 (or $8005 or 0x8005) it'll jump to appData. You can find it here: https://www.omnimaga.org/index.php?page=ram here is some more information as to what all that search supports
Spoiler For Old Post:
persst collat addr name size what destroys it how you should fix it what it breaks
***** **** 9C06 baseAppBrTab2 106 V usb stuff bcall(_fillBasePageTable) multi page apps on 83+SE ***** **** 9C70 usbStuff 62 | usb stuff ----- *** ***** 9CAE SESpeed 1 | this might get randomly written to ----- ***** ***** 9CAF 182 | ??? ----- **** ***** 9D65 localTokStr 17 | used by localization apps ----- **** ***** 9D76 keyToStr 18 | ??? ----- ***** ***** 9D88 sEdMonSp 2 | small edit SP ----- ***** ***** 9D8A bpSave 11 ^ usb stuff ----- 9D95 399
Persistence: ***** barring obscure situations, this memory won't be touched by outside forces **** some avoidable practices will overwrite this memory *** normal operation may occasionally overwrite this memory ** this memory location is not stable by any means, though, it's still memory * this is hardly memory, it's only listed because it was in the way
Collateral damage: ***** changing this memory has absolutely no effect on anything **** there are some situations where changing this has an effect, though, you probably won't run into them *** this makes some rather rare events fail, but it could happen ** this makes some common tasks fail * honestly, the calculator basically crashed
The collateral damage number is only correct if you follow my recommendations for cleanup. If you don't, then things might go very bad. What it breaks is what won't work when you are using that memory, it will work after you are done.
And when you clean up, I recommend you first zero all the memory you used, copy back the manual backup locations, and then run all the necessary bcalls.
Lastly, if you see any changes that need to be made to the list (like anything), be sure to tell me.
Be sure to thank shmibs for hacking the width of this page.
Darl convinced me to make this, and I think it's a great idea. I'll just list all of the utilities I've made here. Not all of them deserve their own topic, so this is a great place to put them.
AppUnlok This runs Calcsys with flash unlocked. Useful if you want to screw with protected ports or look at the certificate. link
CheckOS This returns the 16 bit checksum of your OS, good for if you think you corrupted something. link
Chrono This is a timer/chronometer accurate to 2 ?s. It takes input from the linkport. Here's a better explanation. 84+ only link source
CleanArc This program will fix most corrupted archives. If your archive is corrupted: boot holding the CLEAR button, send this program, run it, it will manually garbage collect, and then reboot. Hopefully this will fix your archive. If it doesn't, scroll down to Rebuild. link
DelCert This deletes the certificate of another calculator via usb->SilverLink. This can fix semi-bricked calculators with bad certificates. To use this, you will need to hook a silver-link adapter up to your 84+ (USB8X style) and plug the I/O end into the semi-bricked calculator. Boot the semi-brick into the boot code, (battery + DEL, or most likely in this case, ON) and run DelCert on the good 84+. If all goes well, in 5 min, it will be unbricked. I used this when developing unsigned. link
Fullrene This is an Axiom that allows you to bypass the $C000 execution limit. Usage: Fcdf() - put this at the start of your program to break the execution limit on all calculators (124 bytes) Fcdf()r - put this at the start of your program to break the execution limit on everything but the 83+BE (76 bytes) link
Group2 This allows you to make groups from a basic program, and if you Hex it, you can put it in-line in a basic program using some kind of shell. Here are the directions: Str3 = group name (all uppercase of course, 8 letter max) Ex: MYGROUP Str4 = list of programs to group with identifiers Ex: +A+B-IMPOSBLE-GROUP2 Identifiers: + = regular program (you can edit it in the editor) - = protected program (you can't edit it in the editor) I'm not positive if it will work with the wrong identifier, never tried it. link
LearnPi Ok, so this isn't a utility, but if you want to memorize PI to 200 decimals, this is a pretty sweet way to do it. link
LinkPort Hey, this program sucks. But if you need a crappy way to toggle the link port state, use this. link
MemTest This app was created after I discovered that I could make the OS run faster by changing a certain port. If you think that your memory is screwing up (highly unlikely unless you overclock) this app can help you determine if it is indeed not working. (This program reads memory in the fastest possible way) link
NSpeed Ever wonder just what speed the NSpire 84+ emulator is running? Well this will tell you. link
NyanMem This program temporarily gives you 64KB more archive space. This should only be used to send apps that are too big to fit on your calculator. A garbage collect will kill this change and might delete part of that super large app. Usage: 1. Clear Mem 2. Run NyanMem 3. Send super large app When done: 4. Clear Mem link
Patcher Source: Use this to easily make patches to your OS. I've included a few sample patch files so you can see how it works. link (I updated this, the old one had 57 downloads)
Rebuild Use this if CleanArc fails. This program will rebuild your VAT in the case that your archive is corrupted. Run this program after an ON + CLEAR boot and then send all of your programs to your computer. I don't know what will happen if you run this program when your vat is actually full, so make sure it is empty. (i.e., don't run it when the calculator acknowledges that you have programs) link
Speed This will tell you: 1. Your maximum LCD refresh rate, 2. Your CPU speed, and 3. The ALCDFIX delay you need (for NSpires, check out NSpeed) link
StopTime This is a pretty sweet stopwatch. I never actually finished the splits, but it sure looks nice. link
SymGraph This enables the Symbolic and Graph3 hooks. Mostly for use with zStart's "run on zStart" link
Univrsl Source: This is the new univeral flash unlock, please use this instead of the old one. It is only 75 bytes, and best of all, it doesn't corrupt the OS. This includes both a program and an app version. link
UnlockAll Source: This is the flash unlock that I created, it works on everything but the 83+BE and is only 47 bytes. link
Unsigned The main purpose of this is to downgrade from OS 2.55 on boot code 1.03. But total features: 1. Name on about screen 2. Custom certificate revision on about screen 3. Installing unsigned apps 4. Installing unsigned OS's link
Unsquish This program unsquishes an assembly program for easy recall into the Basic editor. Usage: Str1 = name of program to unsquish with identifier padded to be exactly 8 characters with spaces Ex: -GROUP2__ Identifiers: + = regular program (you can edit it in the editor) - = protected program (you can't edit it in the editor) It will change the first letter of the program to an A and fill it with hex. To copy/paste the hex codes, just use RCL to recall the program. Ex: RCL prgmAROUP2 link
zStart How could I ever forget zStart? Check my sig for the link.
OS patches (these are all post links)
Here is a link to a post where I put up a whole bunch of my OS mods to fix random things.
Moves the Mem Mgmt/Del... menu into Stat>Tests>H so that your "friends" can't delete stuff. 2.53 only. (Rather silly if you ask me) 2.43 version
OS 2.71 - this was an April Fools prank. This file patches OS 2.55 into the dreaded OS 2.71.
More Precision - while not technically more precise, this patch allows your exponents to range from 10^-127 to 10^127
Faster flash access - this makes writing and reading from flash faster. It basically just makes your calculator faster.
If you want to source to any of these, tell me (either via PM or this topic). I'll then add a little "source" link next to the "link". I'm not going to do it right now because I don't want to spam the attachments system. (If you even think you might want the source, tell me. I actually enjoy it when the source link has several downloads.)
Edit: 5-20-12 Runer got the UnlokAll down to 47 bytes. The Universl got a slight tweek
So, I'm making this thread for two reasons. 1) Everyone likes to tell their story. But 2), this topic can give people some insight into just what they can do to prevent data loss.
The general idea here is to give:
Lost: What you lost.
Cause: The mistake you made that caused you to lose your data.
Solution: What you did to prevent this from happening again.
Now, if you didn't actually create a solution for your loss, then you can't post what you lost . So, if this happens to be the case for you, and you really want to share your story, then you'll just have to figure out a solution so that you can't delete your stuff again.
I think one of the great changes that this thread can create is when someone goes, "Crap, that could totally happen to me," and then they see a solution that can prevent it.
So mine:
Lost: I lost the entire source to my Impossible Game.
Cause: I was testing out a new batch (.bat) file to assemble my assembly sources. In this test file, I accidentally moved the source code rather than copying it. Since the recycle bin doesn't catch stuff deleted in batch files, the source was gone forever.
Solution: I added an extra folder on my C drive (C:\backups) and whenever I assemble an assembly program, I have my batch file add a copy of it to the backups folder. This won't protect against a hard drive failure, but it does protect against accidentally deleting a file or folder.
I believe this started about the same time the bot filter was installed. What happens is that every now and then when I click on a link on omnimaga (just an ordinary link), omnimaga just becomes unresponsive. Stop/Refresh doesn't do anything at all and if I let it go long enough, chrome will ask me if I want to force close it. The only way I can get the page to load is to x out that tab and try again.
Also, it usually happens on the third omnimaga page I open. For instance, www.omnimaga.org > Forums > *click on topic in recent 15* <frozen> That topic will not open and the tab simply hangs on the Forum section.
There's been a lot of trouble lately with people trying to open the program editor (mostly Quigibo and I) so I'm here to show you how it's done. The complete code for opening the edit buffer looks like this:
I'll now explain why this code works by parts: 1. There are two main reasons to set the current app to kExtApps: 1) the OS won't try to clean up an app that isn't already open, 2) if for some reason the previous app was kPrgmEd, the editor is not going to initialize. By setting this, we are essentially resetting the app system
2. This little section takes care of any menus that are currently up. For instance, without this block, if you open the editor from the standard PRGM->Edit menu, the editor will appear to open correctly. But as soon as you try to move, you'll find out that you are actually still inside of the PRGM->Edit menu and all hell will break loose.
3. Simply put, progToEdit is the name of the program you are going to edit. You don't have to copy the progObj token if you don't want to, I just do it for good measure.
4. The _clrTr will actually return kPrgmEd in A, you then feed this value into _newContext0 so that the OS can initialize the program editor app. After the _newContext0, the program editor has actually loaded: the screen looks good and the edit buffer is open. What this means is that at this point, you can mod the edit buffer in whatever way you choose. (In zStart, this is where instant goto happens)
5. These two lines are semi-optional. You don't technically have to have them, but they are a good idea. You should reset the stacks at this point because if you don't do it now, they aren't going to be reset. This means that after a few iterations of opening the editor, SP is going to make its way into the VAT and you'll start corrupting stuff.
6. This hands control back over to the OS so it can do its job.
There's my technical writing of what I've been working on for quite some time. If you don't understand any of it, that's ok I guess, the code still works even if you don't understand why
Edit: I changed this post to reflect my resetting of the stack.
This is a question people ask a lot, will x-level grayscale look good? or will it flicker? Well, now you can decide for yourself. I spent all day not doing my thanksgiving break homework and instead working on this program. It displays all levels of grayscale from 1-8 so you can see what looks good and what doesn't.
Controls:
Left / right - swap levels
/ / * - adjust lcd frequency
+ / - - adjust contrast
2nd - report lcd frequency
Clear - quit
Send this to your real calculator and tell me what you think. This can serve as your model for what is possible because I believe I did this the best that I could.
Also, if you need some grayscale routines, I'm including the source. Just be warned the 7-level one is a piece of crap.
Edit: j/k on the messed up, it was good from the start