Author Topic: Check Calc ID  (Read 9233 times)

0 Members and 2 Guests are viewing this topic.

Offline dinosteven

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 194
  • Rating: +10/-1
    • View Profile
Check Calc ID
« on: August 06, 2012, 01:19:20 am »
Is there any way I can check the calc's ID number and store it to a variable?
School's starting soon, and that means that my classmates are going to steal my calc and try to steal my in development games. I need a way to stop them from using them, so only I can run it! I used to store a key value to a variables, but they've taken to stealing all my variables, too! So I need to find a way to check the calc's ID number, and I thought Axe might be able to do it.

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Check Calc ID
« Reply #1 on: August 06, 2012, 02:09:04 am »
ask thepenguin; he'd know how to manage this, i bet.
* shmibs bets it's somewhere in the certificate or something like that.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Check Calc ID
« Reply #2 on: August 06, 2012, 02:20:46 am »
(this topic needs to be moved)

my classmates are going to steal my calc and try to steal my in development games.
What do they steal ? Your sources or your executables ?
What you can do is also use zStart (check thepenguin77's sig for updates) and put a password to your calc. You'll say "they can remove a battery to RAM Clear and avoid the password" but no, zStart can also run a program on RAM Clears and your classmates will not be able to avoid the password.
And zStart has a lot of other features, like running programs on Homescreen, a label menu in Axe sources (very useful), editing archived programs (very useful too), etc... :D
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Check Calc ID
« Reply #3 on: August 06, 2012, 02:31:30 am »
zstart still has a fail-safe startup mode, so they might get around it if they're lucky; it's much less likely that they'll be able to bypass a hardware check, as they'd have to know axe and be able to pinpoint the line that does the checking. a check like that could be useful for other things as well, like a pokemon game that wants to determine if a pokemon has been traded or not.

oh, and this isn't the wrong section, per se. it would be better to post here, though.
« Last Edit: August 06, 2012, 02:32:02 am by shmibs »

Offline dinosteven

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 194
  • Rating: +10/-1
    • View Profile
Re: Check Calc ID
« Reply #4 on: August 06, 2012, 11:28:32 am »
I've tried zStart, but it crashes every time I use it! I just tried it again, messing with settings randomly, and now my calc is messed up. Every time I start it, it doesn't; I pull the batteries, and it says RAM cleared, but when I try to do anything else, it messes up again. I've backed it up, but...
Anyways, I'll fix it by resetting the OS. zStart doesn't work for me, though.
I think that this topic should be moved, it'd be better there. Someone, please do it!
So, how can you check the ID?

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Check Calc ID
« Reply #5 on: August 06, 2012, 11:32:21 am »
Hayleia's solution sounds fail proof to me, unless they know zStart and press ON+CLEAR when turning on. :-\
That, or you could just keep your calc in a safe place (like a pocket :P)

EDIT:
I've tried zStart, but it crashes every time I use it! I just tried it again, messing with settings randomly, and now my calc is messed up.
Are you sure you are using the latest version of zStart on the right calculator? (the 84+ version is super different than the 83+ version, which are both included in the .zip)
« Last Edit: August 06, 2012, 11:34:27 am by parserp »

Offline dinosteven

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 194
  • Rating: +10/-1
    • View Profile
Re: Check Calc ID
« Reply #6 on: August 06, 2012, 11:54:29 am »
version 1.3.005

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Check Calc ID
« Reply #7 on: August 06, 2012, 11:56:51 am »
Moved. ;) If you can get Zstart to work properly it's a great utility. Many here swear by it. =)

Offline dinosteven

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 194
  • Rating: +10/-1
    • View Profile
Re: Check Calc ID
« Reply #8 on: August 06, 2012, 12:05:01 pm »
I installed it, turned on catalog help, and omnicalc, set Run on RAM Clear, did some stuff with Program settings, and exited. The cursor was blinking normally. Then I pressed the PRGM button (and after testing many times, it seems any button but 2nd, ALPHA, and ON do this,) and everything went blank. I had to pull the batteries, but it kept coming back. Eventually, I used the arrow key trick to disable apps. It also deleted my Groups.
I've got a TI-84+SE, bought it in ~March of this year.

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: Check Calc ID
« Reply #9 on: August 06, 2012, 12:29:16 pm »
Ok, for zStart, to simply get rid of it if it's causing problems, this sequence should always work:
1. Remove a battery
2. Wait longer than 5 seconds
3. Hold down the DEL button
4. Reinsert the battery while still holding DEL
5. Press ON
6. Press any key
7. Hold CLEAR
8. Press ON while holding CLEAR
9. Delete zStart from the Memory Management menu
10. Clear ram from the Reset menu

If you'd rather disable zStart than deleting it, change step 9 to "Delete the zStart appvar from the Memory Management menu (it's about 172 bytes)"

But as far as what's making zStart actually fail, I would love to know. The first thing you can try is to delete it's appvar. There's a chance that will fix it. Then, you can slowly reenable stuff until you find the conflicting setting. You don't have to do this if you don't want to, but if you figure it out, I can fix it for you.
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

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Check Calc ID
« Reply #10 on: August 06, 2012, 12:43:44 pm »
Just about a year ago, mrmprog asked how to get the calc ID in Axe, and the answer is using assembly. Here is my answer from a year ago. :)




Since you're asking about just using the ID for checking, you could use a smaller piece of assembly combined with a bit of Axe to do what you need. For example, this code would cause any calculator except mine* to freeze:
Code: [Select]
Asm(EF7E80)
While 1
End!If {?849C}?-?E198
*1 in 65,536 calculators share this value, but the chance of a classmate's calculator sharing this value are low enough that you probably don't need to worry about this.

?E198 is a 2-byte value I took from my calculator ID. Obviously if you wanted to use this protection method, you wouldn't want to protect your program so only I could run it, you'd want to protect it so only you could run it. To find the value of those 2 bytes in your calculator ID, run the following code, and then replace E198 with the output:
Code: [Select]
Asm(EF7E80)
Disp {?849C}??Hex




As a second line of defense, if you think these people are smart enough to grab your source code and find and remove the check above, you can get really tricky and obfuscate one or two constant values. It would make your program slightly larger, but it would certainly make the ID-based protection harder to circumvent. The more strange the constant value you're replacing, the harder it would be for someone to decipher the true value. For example, here's some code I wrote recently in which I have obfuscated two 2-byte values with a 2-byte value from my calculator ID:
Code: [Select]
ReturnIf +P?r? and ?DF-({?849A}?-?BCBE)*3·({?849A}?-?481F)

That could would only execute properly on my calculator. Because of what this specific piece of code does in the program, this would not cause a crash on other calculators, but the game it's a part of would be unplayable. The format of these obfuscated constant values is ({?849A}?-(id_value+real_constant)). Find id_value using the code two blocks above for finding the value of {?849C}? for your calculator, and just change that to {?849A}?. And make sure to calculate (id_value+real_constant) manually! If you can't easily calculate with the hexadecimal value of {?849A}?, you can change the code to find its value to display the value with ?Dec instead.
« Last Edit: August 06, 2012, 12:46:48 pm by Runer112 »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Check Calc ID
« Reply #11 on: August 06, 2012, 05:18:47 pm »
I don't think much calcs got a duplicate ID, because when that happened in the past, it prevented some people from getting some paid flash apps or registering their calc on TI website. TI recalled the affected calcs.

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: Check Calc ID
« Reply #12 on: August 06, 2012, 05:39:54 pm »
But this code only checks 2 bytes of the ID, not the full one, so it might be the same on different calcs even though they don't have the same full ID. (I think)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Check Calc ID
« Reply #13 on: August 06, 2012, 05:44:41 pm »
Oh ok I thought it was the entire ID. There were episodes of duplicate IDs for real in the past, though: http://www.ticalc.org/archives/news/articles/5/54/54165.html

Offline dinosteven

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 194
  • Rating: +10/-1
    • View Profile
Re: Check Calc ID
« Reply #14 on: August 06, 2012, 07:49:45 pm »
I got '4'. Does that mean
Code: [Select]
:Asm(EF7E80)
:!If {ᴇ849C}ʳ-ᴇ4
:Disp "You can't use this!"
:Return
:End
Will work?