Join us on Discord!
You can help CodeWalrus stay online by donating here.

83/84 hooks - requests / ideas

Started by E37, April 26, 2017, 01:11:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

E37

I have become pretty adept at creating and managing hooks. For those who don't know what a hook is, it allows the programmer to modify the OS's behavior on certain events such as modifying or cancelling key presses, creating custom menus, among other things. If you haven't tried zStart yet, you really should. I won't give an advertisement for something I didn't make, but it does do some really cool things almost all of which are hooks.

So let me explain why I created this post. My calc's trace key is broken. I can press it but it won't register any key press. I would like the function of that key back - without getting a new calc. So, I make a key hook. It allows me to press ON and GRAPH at the same time and the calc to think that the trace key is being pressed. Awesome right? But what about 2nd - trace? I can make it so that when I go to to the catalog and select ZoomRcl it instead presses 2nd - trace. I can go on swapping keys all day long... But, what if I want to do something else? Say, when I press ON+X it runs a program, changes a setting or opens a custom menu. That is some of the power of hooks.

I would be happy to teach anyone who knows the basics of assembly how to use hooks or to write a custom one for someone since I don't have a project to work on right now. Any suggestions on what to create?
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

WholeWheatBagels

A forced reset / wipe might be useful if theres a bunch of random variables that need to be cleaned up or if you're too lazy to find GarbageCollect
[On] + [2nd] + [Clear]
Living in another world to you.



Also in case you were wondering Frankie did go to Hollywood

E37

Quote from: WholeWheatBagels on April 26, 2017, 01:32:02 AM
A forced reset / wipe might be useful if theres a bunch of random variables that need to be cleaned up or if you're too lazy to find GarbageCollect
[On] + [2nd] + [Clear]
What do you mean by a forced reset? A ram clear? If that is all you want, install zStart, and to to the reset ram option in the memory menu and press ON+(any number 1-9) twice. Then whenever you press ON + thatKey your calc will reset ram.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Dream of Omnimaga

#3
For a key hook, make sure that the calc won't mess up while a Basic program is running (eg with OS vs interrupt vs hook conflicts)

Edit by p2: I hate this "Sent from my Nexus 5 using Tapatalk" >.<

  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

E37

Quote from: DJ Omnimaga on April 26, 2017, 07:04:57 PM
For a key hook, make sure that the calc won't mess up while a Basic program is running (eg with OS vs interrupt vs hook conflicts)

Huh. I didn't think about that. The most useful (in my opinion) allows soft keys (uses 2nd and alpha) which shouldn't be a problem for the basic getkey. I also require the ON key to be held so that the key can still be used. I did notice that the OS seems to disable keyhooks when an asm program is running. I wonder if it is the same for basic?
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Dream of Omnimaga

Aren't there already soft keys in OS 2.53MP or higher?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

E37

Quote from: DJ Omnimaga on April 26, 2017, 10:06:44 PM
Aren't there already soft keys in OS 2.53MP or higher?
Soft keys for 2.53? I use 2.43 so I don't know. I am talking about the basic getkey, not the input or prompt function. Wikiti says that the soft key hook is only active in the system monitor so it follows that it wouldn't affect programs. I just tested it and basic programs are unaffected by any key hooks. They are affected by parser hooks of course, but it appears that it the only one. Assembly programs are completely unaffected by hooks.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Dream of Omnimaga

Yeah they added soft keys in MP OSes. I don't remember how to use them, but if I remember, you have to hold down ALPHA. And yeah I am aware that you are talking about the Basic getkey.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

c4ooo

Quote from: DJ Omnimaga on April 26, 2017, 10:06:44 PM
Aren't there already soft keys in OS 2.53MP or higher?
What are soft keys?

E37

Quote from: c4ooo on April 28, 2017, 02:32:50 AM
Quote from: DJ Omnimaga on April 26, 2017, 10:06:44 PM
Aren't there already soft keys in OS 2.53MP or higher?
What are soft keys?
Soft keys are affected by second and alpha.
For example: U is a valid keypress and is different from 5 and L5 and u all of which are the same with a normal getkey.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Powered by EzPortal