Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - FloppusMaximus

Pages: 1 ... 16 17 [18] 19 20
256
General Calculator Help / Re: Exporting/signing apps?
« on: October 31, 2010, 07:30:19 pm »
010A.key is a key that only works for the 84+.  0104 (which is included in the rabbitsign binary) works for both the 83+ and 84+.

257
ASM / Re: Some general Questions
« on: October 31, 2010, 07:23:41 pm »
Well, bit 7 of port 2 is zero on an 83+ BE, whereas it's one on an SE or 84+.  So after the 'and', A is 0 on an 83+ BE, or 1 on a newer model.  As I said, port 20h on an 83+ BE is the same as port 0, so writing 0 to port 20h resets the link port.  Whereas on an SE, writing 1 to port 20h sets 15 MHz mode.

258
ASM / Re: Some general Questions
« on: October 31, 2010, 07:16:07 pm »
Easier than calling SetExSpeed, you can set the speed yourself:
Code: [Select]
 in a, (2)
  add a, a  ; check if on a TI-83+ BE
  jr nc, is_a_ti83p
  ld a, 1
  out (20h), a
is_a_ti83p:

or use MichaelV's method, which works because port 20h is the same as 0 on the 83+ BE (so this also resets the link port):
Code: [Select]
 in a, (2)
  rlca
  and 1
  out (20h), a

But if you're writing an Ion/MirageOS program, you need to be sure to set the speed back to 6 MHz (write zero to port 20h) before exiting, since otherwise the shell and other programs won't work correctly.  In particular, depending on the shell, the ionFastCopy routine may not work correctly at 15 MHz.

Oh, and:
4) http://wikiti.brandonw.net/index.php?title=Z80_Routines:Graphic:put8x8sprite I tried to copy the first routine into Mimas, but it seems like Mimas cannot handle the line LD  D, (IX) ôo. Does anyone know what the problem is?
Yeah, that's a known issue with Mimas.  You have to write "LD D, (IX+0)" instead.

259
General Calculator Help / Re: Exporting/signing apps?
« on: October 31, 2010, 07:04:15 pm »
You don't need to use 010A.key.

App signing does not use RSA, but rather, the Rabin algorithm.

Darl181: when you run rabbitsign, what error message does it give?

260
The Axe Parser Project / Re: Features Wishlist
« on: October 31, 2010, 06:59:05 pm »
Somebody made a "Guitar Hero" type game a while back (with, if I remember correctly, 2-bit sound), so it's not out of the question to do sound and other stuff at the same time.  It's not easy, but it can be done.

For many games, it might be acceptable to freeze the action for a few tenths of a second (or display some simple animation while playing a sound effect.)  And with programmable timer interrupts on the SE, you could play simple sound effects in the "background", fairly effectively.  You'd just have to be careful to base your frame rate on a separate, consistent time source (e.g., the port 3 timers or one of the other programmable timers.)

261
General Calculator Help / Re: MSD8x/USB8x
« on: October 31, 2010, 06:46:17 pm »
In any USB system, there must be one "host" device controlling the bus at all times.  Normally, the host device is also the one that supplies power to the other devices.  So obviously, when you connect two devices, it's important for them to know which is the host.  This is what the A and B cables are about: a host has an A (or mini- or micro-A) socket, whereas a peripheral has either an A plug or a B (or mini- or micro-B) socket.  Standard USB cables always follow this rule (either an A plug on one end and a B plug on the other, or an A plug on one end and an A socket on the other.)  Unfortunately, some manufacturers sell non-standard cables that violate this rule (such as the mini-B to mini-B cable that LordConiupiter mentioned - although I can't imagine what the purpose of such a thing would be.)

This becomes somewhat more confusing with the TI-84+, which has a socket that can accept either a mini-A or a mini-B plug, and allows the calculator to detect which type of plug is connected.  So if you insert a mini-A cable, the calculator acts as a host, while if you insert a mini-B cable, the calculator acts as a peripheral.

(It's also true that USB8x doesn't support peripheral mode, but that's a separate issue.)

@Darl181: Mini-A plugs have white plastic inside, and a roundish overmold.  Mini-B plugs have black plastic inside, and a squarish overmold.  Also, most devices you encounter only have a mini-B socket, so a mini-A plug won't fit.

262
The Axe Parser Project / Re: Axe Parser
« on: October 28, 2010, 11:19:58 pm »
For his purpose of parsing, during which key inputs aren't checked, it won't matter if he overwrites that. Although if he didn't want to overwrite it, I'm sure 1,093 bytes would be just as good. I've filled these 1,094 bytes of RAM with random data a few times before to see if it affects anything, and the calulator runs fine. I've actually been using the calculator to do other stuff since then, with this area of RAM having been filled with garbage, and no side affects have cropped up.

EDIT: Or, just to be safe, I remembered that Iambian mentioned something about this on IRC a while ago (here) when I was considering using this area as temporary storage:
Quote
[22:19:28] <Runer112> yeah, appdata is 8000h
[22:19:29] <Iambian> You're free to use that area regardless.
[22:19:44] <Runer112> appdata is completely safe for my purposes? whether or not i'm running an app?
[22:19:52] <Iambian> Thought you were talking about something that looks more important, like baseAppBrTab or something.
[22:20:21] <Iambian> Either way, this magic romcall that (I think) BrandonW found recovers most of it before you want to exit. bcall($5011) it is.
[22:20:52] <Iambian> It was noted in my source as "restores first 1087 bytes in RAM"
If you don't have a solid understanding of what a RAM area is used for, when it's used, and what the consequences might be of modifying it, how can you say whether it's "safe" for your application?

(Experimenting and finding things that seem not to crash is really not a substitute for this level of understanding.  To wit: I can infer from your comment above that either you have an 84+, or you never use Flash apps.)

"Restores first 1087 bytes in RAM" is cute, but wrong, and frankly, kind of a dangerous thing to go around telling people.

The term "safe" is meaningless without context: what is safe depends both on what type of program you're writing - i.e., the context in which it will be executed - and on what your program is going to do.  By safe, we generally mean that
 (1) a RAM area is not going to be modified by any system or library calls we intend to perform, or by the system interrupt routine, and
 (2) the RAM are is not already in use at the time our program runs (so altering the data there will not have any effect on the system), or more specifically, it won't be expected to contain valid data at the time our program exits.

In some cases we may also want to consider areas where the RAM is already in use, but
 (a) it can be easily reset to its default settings,
 (b) we can reliably ensure the reset routine does get called, regardless of when or how our program terminates, and
 (c) the user won't mind us trashing his or her data.

In brief: the RAM areas between 8000h and 843Dh (I'm going to go ahead and assume you didn't mean to include kbdScanCode and friends) are used by a lot of different system routines under a lot of different circumstances.  As far as I know, all of this memory except for baseAppBrTab is scratch memory (it satisfies condition 2 for most execution environments), but whether it satisfies condition 1 is dependent on what system routines you're using, what hooks those routines might call, whether APD is possible, and whether silent linking is possible.

As for baseAppBrTab, it does not satisfy condition 2 at all, and it is absolutely essential that the table be correctly populated when your program exits.  Realize that the primary purpose of the table is for performing application B_CALLs - so really, it ought to be correctly populated at any time when a hook might be called, or in a shell program, at any time when a shell library might be called.  In practice, using that area is so dicey that I would not feel comfortable doing so at any time when any code outside my control might be executed.

263
General Calculator Help / Re: Non-validating OS - why?
« on: October 28, 2010, 08:31:13 pm »
Yes, any OS patch will invalidate the OS (well, unless you also set a new OS signature.)

Another thing to watch out for is that Brandon's unlocking method may overwrite the byte at 6AAAh on page 2.

264
The Axe Parser Project / Re: On-calculator app signing
« on: October 28, 2010, 12:00:51 am »
It says it's from China.

265
The Axe Parser Project / Re: Axe Parser
« on: October 27, 2010, 11:58:13 pm »
Have you made use of the whopping 1094 bytes of effectively safe RAM starting at $8000?
"Safe" I'd have to dispute... sure, all of RAM can be considered "safe" if you disable interrupts and never call any system routines.  And if you're going as far as keyExtend, you're already trashing the keypad-scanning variables, so why stop there?

266
The Axe Parser Project / Re: On-calculator app signing
« on: October 27, 2010, 11:43:03 pm »
It looks fine to me.  Though, it looks like you probably would run into the apps-getting-deleted issue I was talking about, if you could actually get Axe to compile apps.

But it sounds to me like for whatever reason, the Flash unlocking code isn't working correctly.  The problem is, the way Brandon's method works involves sending some invalid commands to the Flash chip, and different chips may respond differently.  The method used in the program I posted above should be somewhat more robust, although I haven't tested it on all the possible platforms yet.

(By the way, my 83+ BE is even older - 1199A - and Brandon's method seems to work fine.  So, who knows.)

267
The Axe Parser Project / Re: On-calculator app signing
« on: October 27, 2010, 10:17:41 pm »
Well, that's a pretty straightforward program.  Perhaps it's Brandon's unlocking technique that your calculator doesn't like (I believe Axe uses the same technique.)  You could try this version instead.

268
The Axe Parser Project / Re: On-calculator app signing
« on: October 27, 2010, 01:40:09 am »
It is possible, I guess, that you have something weird going on in the certificate page.  If you send me a copy I could take a look - I think BrandonW has tools for backing up and restoring the certificate.

Edit: Yes, he does: http://www.brandonw.net/calcstuff/certtools.zip

269
The Axe Parser Project / Re: On-calculator app signing
« on: October 26, 2010, 11:46:34 pm »
Hmm, I wouldn't think so.  What seems to happen in this case is that the app gets compiled as usual, it just gets marked as deleted right away (so it doesn't show up in the apps menu, and as soon as you try to run another app, the OS will start defragmenting.)

Following up... This seems not to be an issue on 84+es at all, and may not be an issue on newer 83+es either.  I don't really know very much about the internals of that part of the OS, and the more I look at it the weirder it gets.  I'm not sure when exactly these status bits are supposed to be set or cleared in normal operation; the one thing I can say for sure is that if the bit is set, the app isn't considered valid and will end up getting deleted.  I think maybe this was an old security measure that TI decided to stop using, or maybe it was never fully implemented to begin with.

270
The Axe Parser Project / Re: On-calculator app signing
« on: October 26, 2010, 11:10:25 pm »
An update for those who care: my app signing code works, and works pretty well; the remaining difficulties are with the practical side of writing and erasing signatures in existing apps.

Compiling apps with Axe seems to be a little flaky...

- Sometimes the application is deleted as soon as it's created.  I'm not entirely sure, but I think what is happening is that the "app-installed" bit isn't getting cleared, or isn't getting cleared soon enough.  At some point, Axe calls _Arc_Unarc (or maybe some other archive-related routine), and somewhere deep inside that routine, a routine is called that checks the app-installed bits, and deletes any apps that don't have their corresponding bits cleared.

(In case you weren't aware: For an app whose base page is (16h - k), (2Ah - k), or (6Ah - k), depending on the model, the app-installed bit is bit (k % 8) at address 5FE0h + (k / 8) or 7FE0h + (k / 8), depending on which certificate sector is in use.  Thus, if the 4000h sector is in use, bit 1 of 5FE0h always corresponds to the first installed app, regardless of the calc model.  If that's a one-page app, bit 2 of 5FE0h corresponds to the second installed app.  And so forth.)

So, you should be sure to clear the bit as soon as you write the app header and before you make any other OS calls, particularly anything archive-related.

- Sometimes, rather than an all-zeroes signature, the signature contains the bytes 02 0D 40 (not quite correct, as we discussed above) followed by a bunch of apparently-random data.  I'm actually not 100% sure this is Axe's doing, though, as it's proving difficult to reproduce.

Pages: 1 ... 16 17 [18] 19 20