Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: thepenguin77 on June 23, 2011, 12:30:29 am

Title: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 on June 23, 2011, 12:30:29 am
This now works on 83+'s, check it out (http://ourl.ca/11732/222061)

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:
(http://img.removedfromgame.com/imgs/new about screen.gif)


So here's how you can do this. First, download BrandonW's CertTools (http://brandonw.net/calcstuff/certtools.zip) 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:
(http://img.removedfromgame.com/imgs/about name.gif)

Edit2: My files got orphaned.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: DJ Omnimaga on June 23, 2011, 12:34:26 am
This is awesome O.O. It won,t risk causing problems in future OS updates, right?
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 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
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: fb39ca4 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.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Darl181 on June 23, 2011, 12:38:49 am
Win.
'nuff said.

Is this planned to be implemented in zStart, or just as something separate?
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Juju on June 23, 2011, 12:39:06 am
Well that's awesome, what's with the 83+ though?
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Deep Toaster 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
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 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.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: DrDnar 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.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 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.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: DrDnar 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.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 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.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: ztrumpet on June 23, 2011, 11:22:47 am
This is awesome!  Wonderful job, thepenguin.  I'm glad your hard work paid off. :)
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: AGVolnutt 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.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: pianoman on June 23, 2011, 01:29:13 pm
Where exactly is the GETCERT.8xp file?
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Deep Toaster on June 23, 2011, 02:03:37 pm
Where exactly is the GETCERT.8xp file?

thepenguin77 linked to it in the first post:

First, download BrandonW's CertTools (http://brandonw.net/calcstuff/certtools.zip) and send GETCERT.8xp to your calculator.

It's in there.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 on June 23, 2011, 02:05:09 pm
Yep, Deep Thought's got it. I linked to CertTools because it has both GETCERT.8xp and PUTCERT.8xp. That way you can do both.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: pianoman on June 23, 2011, 03:34:27 pm
Oh, ok, thanks!
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 on June 24, 2011, 06:55:52 pm
Newest version is here (http://ourl.ca/11732/222480) (though there's nothing wrong with this one)


This now works for 83+'s and 83+SE's. It worked fine on OS 1.03 and OS 1.19, so I assume it will work on anything. Although, if you run it on an 83+, it will clear ram instead of quitting, so just be prepared for that.

I also added in an option to view the certificate in Calcsys. Normally this is impossible because the certificate is only visible if flash is unlocked. So I JP'd to Calcsys with the flash unlocked. I'm not really sure this is useful for anything, but it wasn't very difficult. If you use it, just be sure you don't run AboutNam from a shell since it deallocates itself and that will create some problems.


One interesting thing that I figured out is that if you install the certificate revision, (it comes with the name remember), you can install any 83+/84+ OS on any 83+/84+ calculator. I don't expect that it will work well, but it will validate fine. It's worth a shot if you're bored.

I'll release the source to this and upload it to ticalc.org as soon as I update it again. (The update is already finished.) I just have to wait for a certain real world event to happen before I release it. If you don't know what I'm talking about, don't worry, you will soon. :D
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Deep Toaster on June 24, 2011, 06:56:48 pm
:W00T:!!!

Thanks thepenguin77!

I'll release the source to this and upload it to ticalc.org as soon as I update it again. (The update is already finished.) I just have to wait for a certain real world event to happen before I release it. If you don't know what I'm talking about, don't worry, you will soon. :D

It's still a year and a half away x.x

I also added in an option to view the certificate in Calcsys. Normally this is impossible because the certificate is only visible if flash is unlocked. So I JP'd to Calcsys with the flash unlocked. I'm not really sure this is useful for anything, but it wasn't very difficult. If you use it, just be sure you don't run AboutNam from a shell since it deallocates itself and that will create some problems.

You can add the DoorsCS header to make it not show up.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: FinaleTI on June 24, 2011, 07:16:50 pm
Awesome update! I'll probably apply this my 83+ now and I've already applied the old one to my 84+ SE.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: DJ Omnimaga on June 24, 2011, 07:17:59 pm
Cool. :D I am tempted to do this with my calcs.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 on June 25, 2011, 12:09:40 am
I was wrong about the OS transferablility. You can't send 83+ OS's to the 84+, but aside from ethical reasons, there's no reason you can't put 2.55MP on your 83+.

Edit:
    I'm not sure there's even enough space to do that. Someone needs to try it.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: FinaleTI on June 25, 2011, 05:24:38 am
I was wrong about the OS transferablility. You can't send 83+ OS's to the 84+, but aside from ethical reasons, there's no reason you can't put 2.55MP on your 83+.

Edit:
    I'm not sure there's even enough space to do that. Someone needs to try it.
I believe, that according to one of the Polypatch things (the one to put 84+ OS's on 83+'s) that any OS past 2.43 uses the extra RAM page that the regular 83+ is lacking. 2.55 would run on a 83+ SE most likely, but not on a 83+ BE.

EDIT:
Let's consider OSes 2.30-2.43:
Compared the the last TI-83+ OS, there is nothing new (except USB & clock support which are useless on a TI-83+).
So installing them is totally useless. You'll get nothing more, and might run into problems.


Let's consider OSes 2.53-2.55:
There is something new: MathPrint. Those ones are interesting.
But they want 48Kb or RAM. So there are instable on basic TI-83+ (RAM chip is only 32Kb).
They'll only work on TI-83+SE (RAM chips is 128Kb).
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 on June 25, 2011, 07:41:43 pm
If anyone is interested in learning about the certificate, I've done a lot of work on wikiti.

Here (http://wikiti.brandonw.net/index.php?title=83Plus:OS:Certificate/Headers) is the general certificate / headers page, and here (http://wikiti.brandonw.net/index.php?title=Category:83Plus:OS:Certificate/Headers:Fields_By_Number) is this list of known fields.

Have fun learning?
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: XVicarious on June 25, 2011, 07:43:02 pm
thepenguin77, the only thing that bugs me about this, is the name is far over on the left. is there a way to center it?
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 on June 25, 2011, 07:57:54 pm
Put some spaces in ;D. The about screen will display up to 48 characters, so use them.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Deep Toaster on June 25, 2011, 11:09:03 pm
Bug: the input box for cert revision # doesn't allow typing numbers :(
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: XVicarious on June 25, 2011, 11:11:26 pm
I second that Deep Thought.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Darl181 on June 25, 2011, 11:12:24 pm
You press alpha or something to get to number mode.  I got it to work.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Deep Toaster on June 25, 2011, 11:13:05 pm
You press alpha or something to get to number mode.  I got it to work.

Doesn't work (not in the new version).

Bug #2: choosing Remove resets all your variables, including those in archive No, this isn't right. Just a stupid mistake on my own part. Sorry for the confusion! /me goes to stab himself
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Darl181 on June 25, 2011, 11:17:19 pm
Oh, i didn't see the update :P
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: DJ Omnimaga on June 25, 2011, 11:29:18 pm
THis sucks deep thought X.x. (since it killed the contest entry)
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Deep Toaster on June 25, 2011, 11:37:43 pm
Okay, how do I say this... It's not aboutnam at all, it was my own stupid mistake for pressing the wrong key at the wrong time. And they're not even gone :w00t:

So sorry I thought it was your program that did that. It's done me no wrong, sorry about the mess!
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 on June 25, 2011, 11:38:11 pm
Ok, so on an 83+, when you quit the program. Make sure you don't hold the CLEAR button for very long. If you hold CLEAR all the way through the ram clear, it will make it appear as if everything in your archive is gone. It is not. Just clear ram again and it will come back.

This is a safety feature of the OS so that you can recover from a corrupted archive.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Deep Toaster on June 26, 2011, 12:00:14 am
Maybe have MODE quit instead of CLEAR?
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 on June 26, 2011, 12:44:23 am
Maybe have MODE quit instead of CLEAR?

Better.


Update! Now, the program won't quit until you have released all the keys. This is to prevent 83+'s from entering the no-archive boot. If you've already installed it in your certificate, this is the exact same program, so you really don't need to download it.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Deep Toaster on June 26, 2011, 12:44:55 am
Nice :D
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: DJ Omnimaga on June 26, 2011, 01:56:58 am
Cool to hear.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Munchor on June 26, 2011, 06:29:24 am
I may be 3 pages late, but this thing looks awesome, nice program thepenguin! This is a very interesting piece of software.

Any word on Nspire 84+ Keypad compatibility?
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: JosJuice on June 26, 2011, 10:13:43 am
Any word on Nspire 84+ Keypad compatibility?
I think that would be quite hard... Anything that writes directly to flash has to be done in a different way when using the Nspire.
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Anima on June 26, 2011, 01:41:51 pm
Nice I will try this with my calc too. This will make my classmates jealous. :P
Are there any risks?
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: thepenguin77 on June 26, 2011, 01:44:41 pm
Any word on Nspire 84+ Keypad compatibility?

I'm just going to have a good laugh about that and not worry about it. I have never even looked at a Nspire 84+ OS. So I don't know how to unlock flash, I don't know the specifics behind writing to flash, and I'm not even sure those calculators have certificates. They probably do, but I don't know either way.

Nice I will try this with my calc too. This will make my classmates jealous. :P
Are there any risks?

At this point, I this program has been run on real 83+'s, 84+'s, and 84+SE's. So while there are some risks if you pull your batteries out half way, it's looking like it is very safe.


Oh, and for everyone who can't figure out how to type numbers. You press 2nd


Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Darl181 on June 26, 2011, 07:40:21 pm
Hmm I could see this being used in a really wrong way in my old classroom...
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Deep Toaster on June 27, 2011, 02:41:21 pm
Calculator desecration? How dare they? D:
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: ralphdspam on June 27, 2011, 06:03:48 pm
Yay!  Now I can prove that it actually is my calculator.  :P
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Eeems on June 27, 2011, 06:18:30 pm
Yay!  Now I can prove that it actually is my calculator.  :P
This :D
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: Darl181 on June 27, 2011, 07:38:55 pm
Yay!  Now I can prove that it actually is my calculator.  :P
This :D
↑↑↑
At least, after i wrote something along the lines of "the game" on it, but now it has my name.

EDIT: 1555posts.  woo?
Title: Re: Putting Your Name in the About Screen / Certificate
Post by: TIfanx1999 on June 27, 2011, 08:41:57 pm
I missed the initial post, but very cool stuff. ^^ So this lead to figuring out that any OS could be sent?