This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 21 May 2007 09:10:40 pm    Post subject:

Hi! I've been working on an app for a little while that will protect calculators against memory loss in a variety of situations. The app started as an improved version of SafeGuard (a program that protects the calculator against TI's TestGuard version 1). The app now does that, as well as protecting against TestGuard version 2. Also, it uses hooks to be more stable and less noticeable than interrupts in SafeGuard.

I've decided to take the program further than that, though. I'd like to be able to simulate an empty calculator following a simulated ram/rom clear. Right now, after a simulated clear, the calculator renames all programs so they are hidden, and unhides them following uninstallation. I'm trying to find out if there is such a mechanism to hide apps as well (from the apps menu and the memory menu).

It wouldn't be so hard to write a blank apps menu, but the memory menus would have to be re-written so that it could show programs if they're around (and other variables) without showing apps. I'd like to find a way to hide apps without re-writing the memory menus. (If the calculator is cleared and then a program is made, the program should be visible in memory without the apps being visible).

Any ideas? :confused:
Back to top
jfabi82


Newbie


Joined: 11 May 2007
Posts: 35

Posted: 21 May 2007 09:44:31 pm    Post subject:

Hmm...
An interesting idea. I wouldn't have a need for that (my Geo. teacher isn't very strict on using programs on tests...), except maybe to fool a few people into thinking that their calculator has been all but destroyed. Still, an interesting idea. Not very knowledgable in this area at all, but let me point you towards Omnicalc, the infamous Application...
One of the many wonderful things that is can do is load the Apps menu on the Silver editions (83+ and 84+) if desired to display them faster. When you're at the top and scroll up to get to the bottom, it doesn't take a few seconds. Also, you can tell it to hide the "Finance" App from the menu.
Find it on TICalc.org...the source is included in a zip within the zip. Many mods of Omnicalc have been made, BTW
Hope that it points you in the right direction.
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 21 May 2007 09:54:18 pm    Post subject:

Ah yes, Omnicalc. It's a great app, I use it for parenthesis assistant and some other things (when I'm not too busy messing around with my own OS hooks!)

See, here's the idea. The calculator is supposed to act perfectly normal while my app is running. If you clear the ram, it'll show the ram clear screens and then all your unarchived programs disappear from the program and memory menus. If you clear rom, all your programs and apps will disappear from the program, app, and memory menus. So, what I'd need is a way to hide the apps from the memory menu, but not necessarily hide everything from it (like, if you clear the rom and then you make a new program, it should show the program but not the apps).

So, whereas Omnicalc replicates the app menu, I instead would need to replicate the memory menus. It's possible, certainly, but it seems like there should be an easier way to mark an app invisible.

Oh well. If there are no ways to do this short of re-writing the memory menus, I think I'll just have the calculator pretend to be devoid of any programs or apps right from the start, and not allow any new programs to be created. It won't be as realistic, but it'll be much less complicated! Besides, my app will already be more sophisticated and intricate than any other memory-protection program I've seen out there (aside from Omnicalc's memory protector, which actually protects the ram against REAL ram clears, whereas mine just fakes a ram clear. Still, I've got another app in the works to out-do Omnicalc's method..... :ninja: )
Back to top
WikiGuru
ADOS (Attention deficit... Oh! Shiny!)


Elite


Joined: 15 Sep 2005
Posts: 923

Posted: 21 May 2007 09:59:34 pm    Post subject:

Install a keyhook that checks if the user presses the memory key, then create your own memory menu that conveniently hides apps and programs.
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 21 May 2007 10:06:05 pm    Post subject:

Thanks for the quick reply! That was pretty much what I was trying to avoid though. For my original goal of seeming like an ordinary calculator, I would have to write a full memory menu that also keeps track of which programs and apps it's allowed to display (based on data in an appvar) and displays the rest properly, allowing for deletes,archives, and such. Also, whenever you do a "ram clear," it'd have to be sure to only hide variables that were unarchived.

I'm not looking to make this such a large endeavor though, so I'll probably not have the calculator hide programs and apps when you clear the ram. Instead, as soon as you install my app it will blank out the program menu, the app menu, and the memory menus. You won't be able to create new programs. So it won't have to keep track of variables, it'll just show fake empty menus until you uninstall it.
Back to top
c_plus_plus
My Face Hertz


Active Member


Joined: 30 Jan 2006
Posts: 575

Posted: 21 May 2007 10:08:02 pm    Post subject:

Sorry... but does this whole conversation mean that the normal method of placing a special character in front of the name doesn't work?
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 21 May 2007 10:11:43 pm    Post subject:

Nope, that works fine for programs. I was inquiring about apps. Apps might be invisible with an incorrect first character, but how would an app get that way? You can't write to rom like that (unless someone has hacked the write protection?) and you can't send a corrupt app over the link cable.
Back to top
brandonw


Advanced Member


Joined: 12 Jan 2007
Posts: 455

Posted: 22 May 2007 12:39:36 am    Post subject:

Use the menu hook to alter the APPS menu. You can check http://brandonw.net/calculators/fake/ for an example.

As far as the Memory Mgmt/Del menu, there's no way to change that (short of taking control of it with the menu hook and writing it yourself)...but keep in mind that the menu hook has changed in the way it's called from the MEM menu in newer OS versions, so make sure you test on several ones (1.16 and 2.41, for example).
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 22 May 2007 05:35:05 pm    Post subject:

I took a look at Fake. This is pretty much what I'm trying to do, but Fake doesn't cover the issue I was concerned about. It only hides programs, and makes a fake empty apps menu. It doesn't actually hide apps from the memory menus, which is what I wanted. It looks like there's no way to hide apps from the memory menus (short of re-writing ti's memory menus), so I'll just write blank menus for apps, programs, and memory, and that'll be that. So when you run my app, it'll immediately look like the calculator is clear of everything, and if you try to do a memory/ram clear, it'll still look like the calculator is clear of everything. Until you disable my app.

P.S. Cool site! What does the pttp program actually do? It seemed to do nothing and then quit, and unless I'm using Calcsys' disassembler wrong, the first command is...ret. So, huh?


Last edited by Guest on 22 May 2007 05:57:08 pm; edited 1 time in total
Back to top
WikiGuru
ADOS (Attention deficit... Oh! Shiny!)


Elite


Joined: 15 Sep 2005
Posts: 923

Posted: 22 May 2007 06:00:37 pm    Post subject:

Is it a ion/mirageOS program? cause if it is, then that should be there to prevent the OS from running such a program.
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 22 May 2007 06:04:12 pm    Post subject:

That was my first thought, but it doesn't show up in MirageOS, and all Ion programs show up in MirageOS, right?
Back to top
WikiGuru
ADOS (Attention deficit... Oh! Shiny!)


Elite


Joined: 15 Sep 2005
Posts: 923

Posted: 22 May 2007 06:07:26 pm    Post subject:

Not necessarily, but they should. You could use DCS to see what kind of program it is (it picks up on all programs).
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 22 May 2007 06:13:38 pm    Post subject:

DCS shows it as regular TI-OS asm, and of course running it in DCS has no effect (except resetting cursor position, since i guess DCS resets that after any program is run).
Back to top
brandonw


Advanced Member


Joined: 12 Jan 2007
Posts: 455

Posted: 22 May 2007 06:37:25 pm    Post subject:

magicdanw wrote:
I took a look at Fake.  This is pretty much what I'm trying to do, but Fake doesn't cover the issue I was concerned about.  It only hides programs, and makes a fake empty apps menu.  It doesn't actually hide apps from the memory menus, which is what I wanted.  It looks like there's no way to hide apps from the memory menus (short of re-writing ti's memory menus), so I'll just write blank menus for apps, programs, and memory, and that'll be that.  So when you run my app, it'll immediately look like the calculator is clear of everything, and if you try to do a memory/ram clear, it'll still look like the calculator is clear of everything.  Until you disable my app.

P.S.  Cool site!  What does the pttp program actually do?  It seemed to do nothing and then quit, and unless I'm using Calcsys' disassembler wrong, the first command is...ret.  So, huh?
[post="105052"]<{POST_SNAPBACK}>[/post]


You're not using Calcsys' disassembler correctly. Smile I can't say what it does.

Fake makes an empty APPS menu because that's what happens when you rest memory from the MEM menu, which was the goal of that a long time ago. If you want to hide apps from the APPS menu, you can just look at the appvar list of apps to keep (or hide) and then build a menu off that. And again, for the MEM menu, you'll just have to rewrite that from scratch, which isn't TOO much work with the menu hook.

EDIT: After trying to disassemble it, the size bytes are C9 00, and maybe you interpreted that as "ret", who knows. But after BB 6D is where it starts.


Last edited by Guest on 22 May 2007 06:56:26 pm; edited 1 time in total
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 22 May 2007 06:56:14 pm    Post subject:

Well, I was wrong about the ret at the beginning. I did read the c9 size byte as a ret. I haven't disassembled it all, but I see why it did nothing for me. It quits unless its on an 84 w/ the latest os. I was running it in PindurTI with an 83+. In an emulated 84 (TilEm) it just freezes and blinks at you. Is it supposed to do more on a real calc?

Last edited by Guest on 22 May 2007 06:58:15 pm; edited 1 time in total
Back to top
brandonw


Advanced Member


Joined: 12 Jan 2007
Posts: 455

Posted: 22 May 2007 06:58:43 pm    Post subject:

magicdanw wrote:
Well, I was wrong about the ret at the beginning.  I went to the wrong ram location.  I haven't disassembled it all, but I see why it did nothing for me.  It quits unless its on an 84 w/ the latest os.  I was running it in PindurTI with an 83+.  In an emulated 84 (TilEm) it just freezes and blinks at you.  Is it supposed to do more on a real calc?
[post="105067"]<{POST_SNAPBACK}>[/post]


It does do something, though it won't be obvious. The filename might give some kind of hint.
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 22 May 2007 07:15:29 pm    Post subject:

Hmm. I'm guessing that TilEm is not properly emulating in this case, cause what I've decompiled looks more complex and sinister than just locking up the calculator. The fact that you're using b_call(8021h) worries me...a lot. IDK what those rom addresses hold, I certainly won't be trying this out on my shiny 84+SE any time soon!
Back to top
brandonw


Advanced Member


Joined: 12 Jan 2007
Posts: 455

Posted: 22 May 2007 07:22:17 pm    Post subject:

I assure you, it's quite safe. :)

This might provide some hints on what's being messed with.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 22 May 2007 07:24:48 pm    Post subject:

Quite safe, huh? That's why archived and unarchived programs exist only in the VAT and nowhere else, and deleting them crashes and causes a REAL RAM Clear?

Still, quite handy to keep annoying teachers away. Laughing
Back to top
brandonw


Advanced Member


Joined: 12 Jan 2007
Posts: 455

Posted: 22 May 2007 07:28:50 pm    Post subject:

Harrierfalcon wrote:
Quite safe, huh?  That's why archived and unarchived programs exist only in the VAT and nowhere else, and deleting them crashes and causes a REAL RAM Clear?

Still, quite handy to keep annoying teachers away. Laughing
[post="105074"]<{POST_SNAPBACK}>[/post]


I'm not sure I understand what you're saying...Fake crashed your calculator by deleting variables?

As far as PTTP, keeping teachers away is precisely what it does.

EDIT: Fake did some funky stuff with the VAT after re-enabling it...that was odd. Oh well, too lazy to look into it. Anyway, the point was to say the menu hook is what you want.


Last edited by Guest on 22 May 2007 07:31:42 pm; edited 1 time in total
Back to top
Display posts from previous:   
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
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Page 1 of 2 » All times are UTC - 5 Hours

 

Advertisement