Author Topic: 83+/84+ Free Ram Areas  (Read 29693 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
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.
« Last Edit: August 25, 2016, 04:50:35 pm by Sorunome »
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 Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: 83+/84+ Free Ram Areas
« Reply #1 on: June 13, 2012, 01:38:26 am »
This is a pretty awesome list. Already bookmarked your post. :D

I have two questions:
  • What does the *breaks mirage* note mean for cmdShadow, and are we sure there's no way to fix this?
  • You mention that the "collateral damage number is only correct if you follow my recommendations for cleanup." Does this mean that if I use baseAppBrTab, even with your recommended cleanup, I'll break multi-page apps on 83+es? That doesn't sound good.

Then, suggestions:
  • Do you want to add specific information about what Axe commands destroy areas of RAM or will be broken if the user destroys them?
  • MD5Buffer could be in the list, as at least parts of it are non-essential. Here's how Axe uses it in order from the end of MD5Buffer to the start (because the order of use is mostly most common up front, least common at the back):
    • 83D9   12 bytes   Axiom variables
    • 83D1   8 bytes   Sprite rotation/flipping and hex printing
    • 83CF   2 bytes   Random seed
    • 83B1   30 bytes   Archived variable pointers (files)
    • 83A5   12 bytes   Subroutine arguments
  • Should OP1 and possibly OP2 have slightly lower persistence ratings? A fairly decent number of Axe commands go through these, especially OP1.
  • I think I could supply decently small substitutes in native Axe for a few of the cleanup B_CALLs, if you wanted that. I know some people like their Axe programs to be pure Axe.


Other than these nitpickings of mine, awesome.
« Last Edit: June 13, 2012, 01:43:53 am by Runer112 »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: 83+/84+ Free Ram Areas
« Reply #2 on: June 13, 2012, 03:46:33 am »
Wow, great list. This should definitely be stickied (or is it already?)
I'm not a nerd but I pretend:

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: 83+/84+ Free Ram Areas
« Reply #3 on: June 13, 2012, 05:26:47 am »
Thaaanks !

EDIT : can I use it in my Axe tutorial ?
« Last Edit: June 13, 2012, 05:36:46 am by kindermoumoute »
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: 83+/84+ Free Ram Areas
« Reply #4 on: June 13, 2012, 09:49:08 am »
axe vars are stored in SaveSScreen, not appBackUpScreen.
the does look rather useful. =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: 83+/84+ Free Ram Areas
« Reply #5 on: June 13, 2012, 01:12:33 pm »
EDIT : can I use it in my Axe tutorial ?

Sure, though, you might want to wait a few days so that all of the errors have been fixed.

« Last Edit: June 14, 2012, 12:41:29 pm by shmibs »
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 aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: 83+/84+ Free Ram Areas
« Reply #6 on: June 13, 2012, 01:23:16 pm »
Um, since you updated the font the table is broken on small screens. (read: my screen)
I'm not a nerd but I pretend:

Offline FloppusMaximus

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +57/-5
    • View Profile
Re: 83+/84+ Free Ram Areas
« Reply #7 on: June 13, 2012, 03:31:24 pm »
Runer112: cmdShadow is used for MirageOS internal storage.  If you overwrite that area, it will break both the MirageOS GUI and some of the MirageOS library routines.  The same is true of some parts of statVars, I don't remember which exactly.  And you can expect the same is true of other shells.

The other thing about cmdShadow is that it is used for Ion's program loader (and, of course, the Ion libraries) so you absolutely must not overwrite that area in an Ion program.

Also, thepenguin77, you didn't mention that appData can be overwritten when APD occurs.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: 83+/84+ Free Ram Areas
« Reply #8 on: June 13, 2012, 03:57:28 pm »
Moved and stickied. :)

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: 83+/84+ Free Ram Areas
« Reply #9 on: June 13, 2012, 06:53:32 pm »
Umm, I think this is not only ASM. This was also intended for use with Axe.
I'm not a nerd but I pretend:

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: 83+/84+ Free Ram Areas
« Reply #10 on: August 18, 2013, 11:45:27 pm »
I found out that parsingPtrs is not safe the hard way. It took me a good hour or so to debug that overwriting basic_start, nextParseByte, and possibly basic_end causes errors to be thrown when the program exits, despite the program not being a BASIC program.

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: 83+/84+ Free Ram Areas
« Reply #11 on: January 05, 2014, 06:33:17 pm »
Just for clarification, are the large spans of unlabeled RAM such as at $843F or $89EC all untouchable? Or just unknown?
There's something about Tuesday...


Pushpins 'n' stuff...


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: 83+/84+ Free Ram Areas
« Reply #12 on: January 05, 2014, 08:18:03 pm »
If it's not labelled, it probably has a 1 star in both categories. Don't even try to mess with those areas unless you are going to restore them afterwards and aren't going to use any bcalls.
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 Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: 83+/84+ Free Ram Areas
« Reply #13 on: January 10, 2014, 09:34:28 am »
Just for clarification, are the large spans of unlabeled RAM such as at $843F or $89EC all untouchable? Or just unknown?
I believe 843Fh is where the OS interrupt handles key presses and such. If I remember correctly, 843Fh holds the current key press, 8445h holds the last registered key press, and the other in between are counters. Specifically, 8442h is used for repeating keys, starting with a value of 50, counting down to zero. If it reaches 0 and it is a repeating key (arrows or [del]) it repeats the key press, and resets the counter to 10. This is why the initial delay is longer after pressing arrows and such. I read these RAM areas because it is much faster than a silly bcall :P You do need interrupts enabled, though.

EDIT: Actually, rereading your post, ZippyDee, I think you read the values like "1087" and "1434" as the size of the gap. instead, if you subtract 8000h from the address and convert to decimal, you will see these are just the offset into RAM :P

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: 83+/84+ Free Ram Areas
« Reply #14 on: March 07, 2015, 04:21:46 pm »
What exactly are "lFont_record" and "sFont_record"?
-German Kuznetsov
The impossible chemical compound.