The first thing that you all will say, after reading the title of this post (Fake Memory Reset), is, "It's been programmed before."

I want, however, to program it myself, in order to get myself familiar with Z80 Assembly. In addition, I do not think that there are any versions for the TI-84 Plus C Silver Edition.

I swear that I shall not use this program for any unethical means, such as cheating on tests.

1. I want the program to be activated by the normal memory clearing menu.

2. This program should not at all clear any memory. However, it should simulate what happens when one presses "2: Reset", thus not only showing the "MEM cleared" screen, but showing the "Resetting all..." screen for a few moments before that.

3. There should be a way to actually clear all memory. Perhaps running the program outside of the memory clear menu can deactivate fake clearing, and make the menu work like it is supposed to work.

Can anyone point me in the right direction? Would this somehow involve modifying the operating system, or is it much simpler than that? How can I make a menu from the OS activate a program made by me?
You will not use this for unethical reasons, but other students will. If you release it into the wild, it's already done; if you keep it to yourself, you'll probably get daily emails from morally bankrupt students who want to fake clearing their RAM. I personally am against this, although I speak only for myself. On the other hand, if you don't make it, I'm sure someone else will soon enough.

To answer your very last question: a menu hook.
To a certain extent, nearly anything is possible. You could make it so that running the program enables the menu hook (that Kerm mentioned), then once the OS reset menu is used, it shows the usual "Mem cleared" message, etc. and also hides all programs in the PRGM menu as well (if I recall correctly, this is done by using an invalid character as the first character of the program name). Then using the OS reset menu again will unhide all the programs in the PRGM menu, so that finally you can run the program again to disable the menu hook.

Essentially, it's a chain of toggling things on/off.

In terms of how you achieve all this, I can't help you much more because:

1. I'd have to work it out myself because I've not done any coding involving menu hooks before Razz
2. I think it's against Cemetech policy to promote this kind of thing too much.

As a community, we try to be teacher friendly as well Smile
Yes, it was probably a bad idea to pick this as my first project in Z80 after the Hello World program. Thanks for the help! I have absolutely no idea what a menu hook is, but I shall do some research.

The toggle idea is a good one. In summary:

1. I program the program to turn on the menu hook when run.

2. The menu hook changes the function of "2: Reset", displaying two fake screens and hiding all programs the first time "2: Reset" is pressed.

3. The second time "2: Reset" is pressed, it still displays both fake screens, but unhides all programs and disables the menu hook.

4. After this, unless the program is run again, it will actually reset all memory.

I will get to the problem of hiding/unhiding programs later. Once I solve the problem of menu hooks, I must solve the problem of displaying the fake screens. Is there a bcall/built-in algorithm, or must I actually program the fake screens myself?
Drawing the fake screens should be the easiest part, just a series of _PutS commands. You might want to do a search in your favorite search engine for "BrandonW" and "fake".
Some links from WikiTI:
http://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9BC0
http://wikiti.brandonw.net/index.php?title=83Plus:OS:Hooks

I'm not sure if things are different between the two calcs (color and B&W), but if they are defined in the CSE include file then i imagine you should be good to go.
Thanks, chickendude. I have another question: I know that inserting a space before the name of a program hides programs, but how do I hide apps? Do I use the same process?
No, i don't think that will work for apps. I believe BrandonW just added a raw key hook for the [App] key that just gives you one option: Finance. Then it runs Finance (returns kFin and sets nz) if the user presses enter. Also, just to be clear, you won't be able to "insert" a space, you'll have to change the first character of the program's name to a non-allowed character.

Btw, when you see an "add a,e" at the start of a hook routine, that's because all hooks require the first byte to be $83 (add a,e has the hex code $83). It's not actually run, though, it's just to make sure your hook wasn't deleted and that the code it's running is the code it was intended to run.
Correct me if I am wrong, but BrandonW's hook doesn't actually hide the apps, just makes Finance the only option you can select. Is there a way to actually stop the apps from showing up?
I think it makes it look like Finance is the only option available, thus making it look like all apps are hidden.
Sorry, but I have two more questions: is all this information applicable for the color edition? For example, are we sure that the beginning byte must be $83, as opposed to $84 or something else?

Can the hook be stored in the program?
scAFwATLxpKzRCmVaHv wrote:
Sorry, but I have two more questions: is all this information applicable for the color edition? For example, are we sure that the beginning byte must be $83, as opposed to $84 or something else?
Yes.

Quote:
Can the hook be stored in the program?
No. Your program can be moved around in RAM, or could even be Archived. Hooks needs to be in a place where it won't move.
What is a good place to store a hook in the color edition?
I'm not too familiar with saferam locations on the CSE, but ideally some place that won't get overwritten by the OS. Since you won't be running any other assembly programs until the programs are unhidden again, it shouldn't matter too much just as long as the OS doesn't use that space for something. In ti84pcse.inc i saw:
Quote:
drawFGColor equ 0A038h
; What's here? 1491 bytes of scrap RAM?
userMem equ 0A60Bh

There's also statVars, i'm not exactly sure what it's used for, but if it's just you using the program it should be fine. You'd just have to avoid whatever messes with statVars, maybe graphing? Most hooks are stored in an application since you don't have to worry about it getting overwritten/moved around.

And also, BrandonW's version is as Mateo says, it creates a new menu when you press [Apps]. I assume this was because hiding apps is either impossible or much more complicated (app names are much more flexible than program names and aren't stored in the VAT).
Could I still store it in the program if the user is given instructions not to archive or delete the program? Or could the program still be moved around?

If not, then wouldn't archive be a better place to store the hook? Or would a GarbageCollect delete the hook?

In addition, I cannot store the hook in any place that would cause the user to be unable to do something, like graphing. Although this program will never be used to cheat on tests by me or anyone else, I want to make this program as if it would. You would have to graph on a test.
All you use the program for is for your teacher. Once your teacher hands you the calc back you can uninstall the hook and unhide your programs, right? Try that scrap of ram between $A038and $A60B and see if that works. Putting the routine in your program means you'd have to first search where your program is stored. It'd also have to be in RAM, and yes, it can still get moved around. Your best bet is to find some saferam. My recommendation, pick a place to save it for now and just move on. Once you get it fully working then you can pick a new place if you want, you just have to change the address where you store it to. The hardest (and most interesting Wink) part is still ahead of you, so i wouldn't worry so much about where to store it. At least not until you've finished it.
If you really wanted to, but I would go with chickendude's advice first and foremost, you could put your hook into an appvar and then search for it. This is way too much work though, so just save it into some safeRAM. I think that plotSScreen has a large chunk on the TI84+CSE.
I actually made a semi-advanced fake memory/RAM clear program, however it is a Ti-BASIC program rather than z80 Assembly. I've never needed it, however I still thought it was a cool idea. Even though I won't use it for unethical reasons, I obviously won't post it here, because of what Kerm said Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement