Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - thepenguin77

Pages: [1] 2 3 4
1
TI Calculators / Perhaps the simplest backup method yet
« on: April 09, 2014, 11:44:53 pm »

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.

2
ASM / Simple way to backup sources
« on: May 05, 2013, 06:58:52 pm »
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:
Code: [Select]
@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.

3
I was on reddit and I noticed this.

http://www.reddit.com/r/IAmA/comments/13ozy1/i_am_brandon_sterner_the_creator_of_block_dude/

May we all be slightly jealous.

4
News / Faster Flash Access for the 83+/84+
« 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:


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.

5
Other Calculators / More Precision on the 83+/84+ (10^127 - 10^-127)
« on: November 08, 2012, 11:29:26 pm »
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. ;D

6
ASM / How prolific are you?
« on: September 02, 2012, 01:36:09 pm »
Everyone wants to know how many lines of code they've written in their lifetime right? Well now you can.

Assuming you have all of your source files in one giant folder make a batch file that looks like this and run it.
Code: [Select]
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?

7
Site Feedback and Questions / OmnomIRC not loading
« on: June 29, 2012, 11:20:19 am »
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)

Here's a picture to better explain.

8
Math and Science / Least amount of change
« on: June 25, 2012, 11:49:00 pm »
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 :P)
  • 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.

I believe the solution is to carry no change.

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.

9
ASM / 83+/84+ Free Ram Areas
« on: June 12, 2012, 11:47:39 pm »
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

                                                                             
*****  *****  8000   appData          256   v   APD (OFFSCRPT)                  -----
***    *****  8100   ramCode          119   |   flash activities                -----
*****  *****  8177   smallEditCol     185   |   ----                            -----
*****  ****   8230   baseAppBrTab      33   |   ----                            bcall(_fillBasePageTable)    multipage apps on 83+
*****  *****  8251   bootTemp           8   |   receiving OS                    -----
*****  *****  8259   MD5Stuff          74   |   MD5 calculations                -----
****   *****  82A3   appSearchPage      2   |   OS general app routines         -----
****   *****  82A5   tempSwapArea L4  232   |   archive stuff                   -----
****   *****  838D   appID              5   |   OS general app routines         -----
****   *****  8392   arcPageStuff       3   |   most archive operations         -----
****   *****  8395                     16   |   ???                             -----
*      *****  83A5   MD5Buffer         12   |   Axe-subroutine arguments        -----
**     *****  83B1   MD5Buffer         30   |   Axe-Archived variable pointers  ----- 
**     ***    83CF   MD5Buffer          2   |   Axe-random seed                 -----
***    *****  83D1   MD5Buffer          8   |   Axe-sprite rotation/flipping and hex printing -----
****   *****  83D9   MD5Buffer         12   |   Axe-axiom variables             -----
*****  *****  83E5                      6   |   ???                             -----
***    *****  83EB   Abackup            1   |   flash operations, app bcalls, and other? -----
****   *****  83EC                      2   |   ???                             -----
****   *****  83EE   arcInfo           68   |   link routines and other?        -----
****   *****  8432   appInfo           13   ^   OS general app routines         -----
              843F                         1087

****   *****  8452   prevDData          8   V   ???                             zero
*      *****  845A   lFont_record       8   |   large font                      -----
*      *****  8462   sFont_record       8   |   small font                      -----
****   ****   846A   tokVarPtr          4   |   ???                             zero
****   *****  846E   indicMem          10   |   run indicator                   -----
*      *****  8478   OP1               11   |   Axe-AppVars, float{}, Ans, Text >Dec -----
**     *****  8483   OP2               11   |   Axe-float{}, Ans, Text >Dec     -----
***    *****  848E   OP3               11   |   Text > Tok                      -----
***    *****  8499   OP4-OP6           38   |   random OS routines              -----
****   *****  84BF   progToEdit         8   |   running apps, editing progs     -----
****   *****  84C7   nameBuff          11   |   typing a name                   -----
****   *****  84D2   equ_edit_save      1   |   ??? opening an editor?          -----
****   *****  84D3   iMathPtrs         10   |   editing anything                -----
****   *****  84DD   stuff             14   |   ??? probably editing?           zero
**     *****  84EB   asm_pointers       8   |   moving user memory              -----
*****  *****  84F3   asm_ram           21   |   -----                           -----
****   ****   8508   textShadow L5    128   |   -----                           bcall(_clrTxtShd)
****   ****   8588   textShadPtrs       5   |   -----                           bcall(_clrTxtShd)
****   **     858D   cxVectors         25   |   -----                           manual restore                 changing apps (quitting)
****   *****  85A6                      4   |   -----                           -----           
****   *****  85AA   monQueue          18   |   ???                             -----
***    ***    85BC   onSP               2   |   -----                           manual restore                 homescreen errors
****   *****  85BE   promptStuff       18   |   ???                             -----
****   *****  85D0   varType           12   |   -----                           -----
****   ***    85DC   menuStuff          7   |   -----                           zero
****   ***    85E3   menuFlagBackups    4   |   -----                           zero
****   *****  85E7   progCurrent      120   |   -----                           -----
*****  *****  865F   linkStuff        120   |   linking                         -----
*      ****   86D7   penCol             2   |   small font, OS drawing          zero works
****   ****   86D9   rclQueuePtrs       4   |   -----                           -----
***    ***    86DD   errNo              1   |   OS errors (like appvar stuff)   zero
***    ***    86DE   errSP              2   |   OS errors                       manual restore
***    ***    86E0   errOffset          2   |   OS errors                       zero
*****  *****  86E2                     10   |                                   -----
*****  *****  86EC   saveSScreen L1   714   |   APD                             -----
**     *****  89B6   saveSScreen L1    54   ^   Axe-A-Theta                     -----
              89EC                         1434
                                                                                                     
*****  *****  8A36                      4   V   -----                           -----
*****  *****  8A3A   statVars L2      531   |   -----                           bcall(_delRes)
*****  *****  8C4D   infVars          202   |   -----                           zero
*****  ***    8D17   curGStyle          1   |   -----                           zero
*****  ****   8D18   curGY            137   |   -----                           zero
*****  **     8DA1   graphStuff         6   |   -----                           manual backup                  graphing
*****  ****   8DA7   entryStackStuff  133   |   -----                           manual backup                  entry stack (2nd entry)
*****  *****  8E2C                     59   |   ???                             -----
*****  ****   8E67   graphVariables   494   |   -----                           bcall(_grReset)                graphing variables
*****  ****   9055   financeVariables 126   |   -----                           bcall(_zeroFinanceVars)        finance variables
*****  *****  90D3   smallEditRam     108   |   -----                           -----
*****  ****   913F   moreGraphVars    157   |   -----                           bcall(_grReset)                graphing variables
*****  ****   91DC   tableStuff       294   |   -----                           zero
*****  ****   9302   entryStackStuff    5   |   -----                           manual restore                 entry stack (2nd entry)
*****  *****  9307                     57   |   BASIC menus                     -----
**     *****  9340   plotSScreen L6   768   |   most screen activities          -----
*****  ****   9640   randomSeeds       18   |   -----                           bcall(_randInit)
*****  ****   9652   parsingPtrs       28   |   -----                           manual restore                  quittting
*****  ***    966E   cmdShadow        128   |   -----                           bcall(_clrTxtShd) then bcall(_saveCmdShadow)   MirageOS
                                                                                LnReg and manual restore for MirageOS
*****  ****   96EE   cmdShadowPtrs      6   |   -----                           bcall(_clrTxtShd) then bcall(_saveSmdShadow)
****   *****  96F4   editPtrs           8   |   opening edit buffer             -----                                                               
*****  ****   96FC   listEditPtrs     121   |   -----                           zero 
*****  ****   9775   graphTypes        48   |   -----                           zero
*****  *      97A5   windowStuff       11   |   -----                           manual restore                 small and large text
****   *****  97B0   formatStuff       92   |   displaying OS formatted strings -----
*****  *****  980C   equationStuff      9   |   ??? evaluating an equation?     zero
****   ****   9815                     11   |   ??? deleting stuff?             zero
**     *      9820   stackPointers     20   |   user mem operations             manual restore                 don't touch user mem (appvars)
****   *****  9834   pagedStuff         8   |   archive reading                 -----
****   *****  983C                     43   |   menus                           zero
****   *****  9867   flashTemp          9   |   reading flash                   -----
****   *****  9870   appRawKeyHandle    2   |   ???                             -----
*****  *****  9872   appBakUpScrn L3  768   ^   -----                           -----
              9B72                         4412                                                                       
                                                                                                           
*****  ****   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


bcalls:
bcall(_clrTxtShd)          Asm(EF4C45)         
bcall(_delRes)             Asm(EF204A)
bcall(_fillBasePageTable)  Asm(EF1150)
bcall(_grReset)            Asm(EF3148)
bcall(_randInit)           Asm(EF7F4B)
bcall(_saveCmdShadow)      Asm(EF7345)
bcall(_zeroFinanceVars)    Asm(EF2B51)
[/size]
[/font]
[/td][/tr]
[tr][td][/td][/tr]
[/table]


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.

10
TI Z80 / Thepenguin77's Utilities
« on: May 05, 2012, 03:33:17 pm »
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.

2.55 fraction glitch fix (actually caused by old univeral unlock exploit)

Bad address 2.53 fix (In that mega pack above, I screwed up the 2.53 fix)

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

11
Other Calculators / Worst Data Loss + What you've done to stop it
« on: April 20, 2012, 07:26:22 pm »
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 ;D. 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.

12
Site Feedback and Questions / Unresponsive website (at times)
« on: April 06, 2012, 08:49:49 pm »
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.

13
ASM / How to open the program editor
« on: February 20, 2012, 01:01:49 am »
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:

Code: [Select]
ld a, kExtApps ;1
ld (cxCurApp), a

ld a, kPrgmEd
bcall(_pullDownChk) ;2
bcall(_clrTR)

ld hl, programName
ld de, progToEdit-1 ;3
bcall(_mov9B)

bcall(_newContext0) ;4

ld sp, (onSP) ;5
bcall(_resetStacks)

bcall(_mon) ;6


programName:
.db progObj, "NAME", 0

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 ;D

Edit:
   I changed this post to reflect my resetting of the stack.

14
Axe / Calling one axe program from another
« on: February 17, 2012, 04:47:13 pm »
Bet you didn't think you'd see a topic from me.

In any case, we just discussed it on IRC, and there's a pretty simple way to call one axe program from another.

Code: [Select]
Copy("prgmNAME",33912,9
asm(EF7C4E)

This will work as long as prgmNAME is in ram, so if it's not, you'll have to unarchive it first. Hopefully someone has fun with this.

Edit:
   And here's how you do Basic programs.

15
Other Calculators / What does x-level grayscale look like?
« on: November 28, 2011, 05:54:19 pm »
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

Pages: [1] 2 3 4