Author Topic: Putting Your Name in the About Screen / Certificate  (Read 10781 times)

0 Members and 1 Guest are viewing this topic.

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
Putting Your Name in the About Screen / Certificate
« on: June 23, 2011, 12:30:29 am »
This now works on 83+'s, check it out

A couple months ago, I was talking to BrandonW about how I put my name on the about screen through OS mods. He said that was cool, but to do it the right way I had to put it in the certificate. He then told me how extremely hard it was and how many different things you had to get right to make it work. At the time, the just sounded scary so I didn't look into it.

But now, I've been looking through the boot code for receiving OS's and I noticed that the OS headers are actually pretty simple. I then realized that the certificate uses the exact same format and it also wasn't that scary. So then, after a bit more disassembling, I added a few bytes to the certificate, and sure enough, there was my name on the about screen. The only problem was that there was a line called "Cert.Revision" which displayed garbage. So after a little tweaking I got that working.

I was happy and started writing this program. I was going to add a certificate revision field, with a revision number subfield, and a about screen subfield with an about screen text group. But as I was looking more into the boot code. I realized that if I added these fields, I also had to store the keys in the certificate, otherwise, the calculator would refuse to receive any apps or OS's.

After lots of trial and error with the keys and the format they needed to be in. (At first I had all the keys switched around and in the wrong format) and 5 failed CtlgHelp transfers and 1 failed OS transfer (I had to delete the certificate, but I was prepared for this.) I finally got it to work. Then, I spent a long time making sure this was the most secure program ever because I don't ever want it to glitch. (This includes sending 4 OS's and several apps to two separate calculators.)

I should also mention that I made this program very forgiving. It doesn't assume anything. If you have brandonW's 0005 key installed on your calculator, this mod won't even touch it. It also has code to deal with things previously in the certificate that shouldn't be there. You can see this in the way that it lets you edit what you have already put in the certificate.

Here is a list of the fields it adds:
 - 0300 Certificate revision
     - 0100 Certificate revision number
     - 0500 About screen data
         - 0510 About screen text
     - 0700 Key list
         - 0710 04 OS key header
         - 0730 04 OS key data
         - 0710 0A OS key header
         - 0730 0A OS key data
         - 0710 0104 app key header
         - 0730 0104 app key data
         - 0710 010A app key header
         - 0730 010A app key data

And the end result:



So here's how you can do this. First, download BrandonW's CertTools and send GETCERT.8xp to your calculator. Then run it and transfer your certificate (appVar) back to your computer. It's a good idea to have a copy of your certificate on your computer anyways. (You don't have to do this, it's just a good idea)

Next, send the attached ABOUTNAM.8xp to your calculator and run it. Select "Add Name". It will now ask you for a certificate revision number, you don't have a choice, you have to give it one. Then it will ask your for your about screen text, make that whatever you want.

It will then install the changes and you can go check out your cool about screen. The best part, it is persistent through OS transfers. It is essentially permanent. There are only 3 ways to get rid of it: 1) run this program and select "Remove", 2) Send your certificate back with PUTCERT.8xp, 3) Delete the certificate.

If the program instantly quits on you, that means that you either 1) are using an 83+ (I'm not sure if this will work exactly the same) or 2) have low batteries. If it quits while it is installing, that means it encountered an "F" size byte and figured it's just better to quit. This really shouldn't happen.


So have fun, I made this program as secure as possible. I don't believe you could do anything to crash it, other than maybe pulling out your batteries. (Which is a bad idea)

Edit, the picture wasn't working right:


Edit2: My files got orphaned.
« Last Edit: June 24, 2011, 06:57:45 pm 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 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: Putting Your Name in the About Screen / Certificate
« Reply #1 on: June 23, 2011, 12:34:26 am »
This is awesome O.O. It won,t risk causing problems in future OS updates, right?

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: Putting Your Name in the About Screen / Certificate
« Reply #2 on: June 23, 2011, 12:36:45 am »
Nope, not at all. In fact, it actually gives you more options. The boot code has the 04 OS code stored in it. But it doesn't want to use it. So I'm not sure why you would ever sign your OS with the 04 code, but now it will accept it.

From the outside, if I didn't tell you it added in all those keys, you would never know. :D
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 fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Putting Your Name in the About Screen / Certificate
« Reply #3 on: June 23, 2011, 12:37:54 am »
Cool! Not to spoil the fun, but you can always write your name on the back of the calculator :P.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Putting Your Name in the About Screen / Certificate
« Reply #4 on: June 23, 2011, 12:38:49 am »
Win.
'nuff said.

Is this planned to be implemented in zStart, or just as something separate?
Vy'o'us pleorsdti thl'e gjaemue

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Putting Your Name in the About Screen / Certificate
« Reply #5 on: June 23, 2011, 12:39:06 am »
Well that's awesome, what's with the 83+ though?

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Putting Your Name in the About Screen / Certificate
« Reply #6 on: June 23, 2011, 12:47:18 am »
:w0000—
If the program instantly quits on you, that means that you either 1) are using an 83+ (I'm not sure if this will work exactly the same)
Aww. Still awesome nonetheless. +1
« Last Edit: June 23, 2011, 12:47:47 am by Deep Thought »




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: Putting Your Name in the About Screen / Certificate
« Reply #7 on: June 23, 2011, 12:48:02 am »
Darl, I would have no reason to put this in zStart because it has nothing to do with hooks and only has to be run once. Plus, I think it's better this way, run the program once and get rid of it, that way, no one can take your name off of it.

I didn't put it on the 83+ for 3 reasons. 1) I'm not sure it will work exactly as is, and I didn't want to go disassemble a whole 83+ boot sector. 2) The 83+ is really annoying when it comes to ports, unlocking flash, and writing flash, (83+SE is fine). 3) The 83+ lacks an extra ram page which I use to buffer the certificate while I'm changing it. But I guess I could just overwrite OS data and have it clear ram.
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 DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: Putting Your Name in the About Screen / Certificate
« Reply #8 on: June 23, 2011, 01:22:49 am »
A whole certificate is only 8 K, which you can easily fit in main RAM. Also, you can probably figure out a way to completely avoid buffering in RAM and just write straight to the inactive sector.
"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: Putting Your Name in the About Screen / Certificate
« Reply #9 on: June 23, 2011, 02:09:19 am »
A whole certificate is only 8 K, which you can easily fit in main RAM. Also, you can probably figure out a way to completely avoid buffering in RAM and just write straight to the inactive sector.

Well, 8KB, where am I going to put that? And then, when I modify it, I expand it quite a bit because of all of the nested fields.

And writing it straight back to flash would be terrible. That's how I do OS mods, but the certificate is an entirely different creature.


Quick certificate lesson:
The format of a certificate field looks like this.

TT TS [SS] [SS] [DD] [DD] [DD] ...   Where, T is type, S is size, and D is data.

The type can be anything, that is where the 0310 fields come from.

The size however, is where all of the trouble comes in. The first size nibble can either be 0-C, D, E, or F. 0-C are literal, the data is 0-C bytes long. D means that the following byte is the size of the field. E means that the follow two bytes (big endian) are the size of the field. And F is very strange, I haven't seen it used except at the start and ends of App and OS headers.

So the problem that you can see here is that depending on the size of the data, you actually have to shift the data left and right to make room for the size bytes. And then when you go nesting 3 fields inside of each other, that is a lot of calculations that you have to do in advanced if you are only going to write it once.

Consider this, this is what it takes to add text to the about screen:

Code: [Select]
03, 0D, 14,      (      05, 0D, 11,        (      05, 1D, 0E,      (      B, r, i, a, n, 20, C, o, v, e, n, t, r, y  )))
cert.Rev: size 14    aboutData: size 11    about text: size 0E       text

To write that, I had to put in place holders for the size. But the annoying part, (which I found out), adding only what I showed there to the certificate that will display garbage on the about screen and will not allow the calculator to receive apps or OS's. To make the calculator work, you have to add a bunch more stuff. You have to add so much stuff that the 0300 field size byte actually goes to 0E, which means you have to shift everything over.
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 DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: Putting Your Name in the About Screen / Certificate
« Reply #10 on: June 23, 2011, 02:24:51 am »
At any rate, BrandonW's CertEdit app can do this, just not so easily.

Edit: By the way, 0100 is the certificate revision number, not 0310.
« Last Edit: June 23, 2011, 04:59:55 am by DrDnar »
"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: Putting Your Name in the About Screen / Certificate
« Reply #11 on: June 23, 2011, 11:17:12 am »
Isn't certEdit a computer program? But at any rate, the way I got it working works really simply, and I'll look into seeing if I can make this work on 83+'s.

Oh, oops, 0310 just made sense when I was writing that. But yes, it is 0100 and that is what the program uses.
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 ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Putting Your Name in the About Screen / Certificate
« Reply #12 on: June 23, 2011, 11:22:47 am »
This is awesome!  Wonderful job, thepenguin.  I'm glad your hard work paid off. :)

Offline AGVolnutt

  • LV3 Member (Next: 100)
  • ***
  • Posts: 58
  • Rating: +4/-0
    • View Profile
Re: Putting Your Name in the About Screen / Certificate
« Reply #13 on: June 23, 2011, 12:40:05 pm »
Cool! Not to spoil the fun, but you can always write your name on the back of the calculator :P.

Someone could easily use Germ-X to remove it. Having your name in the calculator about screen (where a theif would be least likely to look) is much more secure if authorities find it. Of course, you can easily claim it by telling an administrator to go to the about screen, since your name is hard-coded in.

Offline pianoman

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 426
  • Rating: +24/-0
  • ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
    • View Profile
Re: Putting Your Name in the About Screen / Certificate
« Reply #14 on: June 23, 2011, 01:29:13 pm »
Where exactly is the GETCERT.8xp file?