Author Topic: 84+ Extra Ram Page  (Read 4328 times)

0 Members and 1 Guest are viewing this topic.

Offline Camdenmil

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 121
  • Rating: +4/-0
    • View Profile
84+ Extra Ram Page
« on: January 17, 2013, 09:34:34 pm »
In an Axe program, I'm using page 83h for storage. I'm using about ~14k of the page right now. What do I have to reinitialize or restore when exiting the program? Right now I get ram clears on exit but that's expected because I'm not restoring anything.
It is bad luck to be superstitious.

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: 84+ Extra Ram Page
« Reply #1 on: January 17, 2013, 10:39:31 pm »
You can do that in Axe? Also, page 83h? That's the same as page 82h on port 15h=55h models.

Anyway, according to WikiTI:
* RAM page 3, 977Eh–9A7Dh -- previous entries. Destroying this causes crashes.
* RAM page 3, 9A7Eh–9D7Dh -- homescreen graph buffer. Zero after destroying to prevent flicker.

If that's not enough information, try using an emulator: set up a memory watch on all addresses on page 82/83h and see what addresses the OS touches. Or, make a series of programs that overwrite blocks of memory and see which ones cause a crash.
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

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: 84+ Extra Ram Page
« Reply #2 on: January 18, 2013, 12:32:22 am »
You can do that in Axe? Also, page 83h? That's the same as page 82h on port 15h=55h models.

Anyway, according to WikiTI:
* RAM page 3, 977Eh–9A7Dh -- previous entries. Destroying this causes crashes.
* RAM page 3, 9A7Eh–9D7Dh -- homescreen graph buffer. Zero after destroying to prevent flicker.

If that's not enough information, try using an emulator: set up a memory watch on all addresses on page 82/83h and see what addresses the OS touches. Or, make a series of programs that overwrite blocks of memory and see which ones cause a crash.

You forgot about $4000-$4080. Use bcall(_fillBasePageTable) to restore that otherwise multipage apps could crash. (Asm(EF1150))

And don't forget Camdenmil that when you swap the ram page in, the high two bits of the address change depending on where you put it. Since I'm going to assume you put it in the $4000 region, the WikiTi ranges would be 577Eh-5A7Dh and 5A7Eh-5D7Dh. (I actually wrote that section and I have no idea why I used $9000 addresses.)
« Last Edit: January 18, 2013, 12:32:49 am by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: 84+ Extra Ram Page
« Reply #3 on: January 18, 2013, 12:34:47 am »
Hold it, you can't map RAM into $4000 on all calcs (notably the Pocket versions, since we're talking 84+)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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: 84+ Extra Ram Page
« Reply #4 on: January 18, 2013, 12:38:19 am »
As well, make sure that if you are swapping out the page, you swap back in the old page. That is probably the main source of crashing that I can think of. For example, I am not sure if you are using hexcodes to do that, but here is how it would be done:
Code: [Select]
Asm(DB066F)→P     ;Save flashpage
<<program>>
P:Asm(7DD306      ;restore flashpage at the end of your program

Offline Camdenmil

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 121
  • Rating: +4/-0
    • View Profile
Re: 84+ Extra Ram Page
« Reply #5 on: January 19, 2013, 10:40:52 pm »
I'm restoring the original page with that exact code ;D
The crashing went away when I restored the data wikiti mentions. I was about to ask about app crashing but that bcall fixed that. Mathprint, not that I use it, acts weird after I destroy all of its data in the extra page. To disable it, do I have to do anything else besides reset 5, (IY+44h)?

Hold it, you can't map RAM into $4000 on all calcs (notably the Pocket versions, since we're talking 84+)
I wouldn't put it passed TI to screw up that badly ::)
It is bad luck to be superstitious.

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: 84+ Extra Ram Page
« Reply #6 on: January 21, 2013, 12:50:06 pm »
I'm restoring the original page with that exact code ;D
The crashing went away when I restored the data wikiti mentions. I was about to ask about app crashing but that bcall fixed that. Mathprint, not that I use it, acts weird after I destroy all of its data in the extra page. To disable it, do I have to do anything else besides reset 5, (IY+44h)?

To change the state of MathPrint, use this code:
Code: [Select]
res 5, (iy + $44)      ; or set

bcall(_clrTxtShd)                ;these are only required if you actually change the state of mathprint
bcall(_saveCMDShadow)       ;these clear the homescreen so only use them if you need them

I believe you know how to change flags, but the bcalls are Asm(EF4C45EF7345).


However, I should warn you that even if you turn off MathPrint, you still need to restore the 977E buffer. This buffer is used in both MathPrint and classic.
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 calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: 84+ Extra Ram Page
« Reply #7 on: January 21, 2013, 11:10:14 pm »
Hold it, you can't map RAM into $4000 on all calcs (notably the Pocket versions, since we're talking 84+)
I remember the discussions when this was first discovered. Didn't BrandonW later retract his claim that this was the case because he made some mistake? Or if he didn't, I thought he at least clarified it somewhat.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.