Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: ralphdspam on November 02, 2011, 05:09:35 pm

Title: More USB Information?
Post by: ralphdspam on November 02, 2011, 05:09:35 pm
Hello, all!

Recently, I have gained more interest in the TI-84 Plus SE's USB port.  Unfortunately, information on the ports seems sparse and incomplete.
I have taken a look at http://wikiti.brandonw.net/index.php?title=Category:83Plus:Ports:By_Address and http://wikiti.brandonw.net/index.php?title=83Plus:OS:84_Plus_USB_Information, but I have no idea where to start.

The USB port seems very complex in contrast to port $00.  Can anyone provide sample test routines for the USB interface?  More specifically, I am interested in using the calculator as a device (as opposed to a host).
Title: Re: More USB Information?
Post by: thepenguin77 on November 02, 2011, 05:44:06 pm
USB. There's not much information because we don't have much information. When you enter the world of USB, regular asm is gone forever. You now enter the world of randomness without reason. There is no debugging, there is no 100% information, you start to involve hardware failures, and stuff can just not work for no reason at all.

Now that that's out of the way, if you're going to do anything serious with USB, you honestly have to start disassembling the OS to see how they do it. To do this, you're going to want to get IDA somehow and then start looking at page 6F as well as page 75. The OS is useful because they actually knew what they were doing, we can only hope to copy them.

For code, the OS is by far the best resource you have. After that, you can start looking at USB8X as well as my Blue2 program I'm going to attach. There's no reason to show you routines here because they are massive and many.

Finally, for the ports, wikiTI was recently updated by Floppus and myself, there's brandonW's notes on USB ports (http://brandonw.net/calcstuff/USBportNotes.txt), and finally there's my large text document which I will also attach.

USB isn't impossible, but it is definitely not easy. You will want some kind of on-screen feedback system to report what happens as it happens. I honestly don't care if you copy my console system from Blue2 because it works marvelously. I'll also attach my program that deletes the Certificate of another calculator via usb>silverlink>I/O port. It has some good routines on data sending.

Lastly, yes, you really need to disassemble the OS. Floppus Maximus, Dan E, BrandonW, and I are some of the few people I know of that have done serious USB port work, and we all have OS disassemblies. (If I missed any, tell me)
Title: Re: More USB Information?
Post by: ralphdspam on November 02, 2011, 06:19:58 pm
Thanks for the quick response!

Do I have to personally dissassemble the OS, or is there already a good commented one?  (If I have to, it might take me three to four months. :P)

EDIT Quick question: Are the memory addresses memory-mapped I/O or just the OS's RAM?
Title: Re: More USB Information?
Post by: thepenguin77 on November 03, 2011, 03:21:22 pm
Those addresses are just stuff the OS uses. You can completely disregard them.

You can certainly use someone else's disassembly, and that's not a bad idea.
Title: Re: More USB Information?
Post by: Quigibo on November 04, 2011, 02:17:06 am
Brandonw has a semi-commented full disassembly on his website, but I'm not supposed to share the link.  Its not too hard to find it if you know where to look ;)
Title: Re: More USB Information?
Post by: AngelFish on November 04, 2011, 05:02:34 am
USB. There's not much information because we don't have much information. When you enter the world of USB, regular asm is gone forever. You now enter the world of randomness without reason. There is no debugging, there is no 100% information, you start to involve hardware failures, and stuff can just not work for no reason at all.

+1 for dramatic and completely justified statement.

Also, I think DrDnar spent some time with USB, but I could be wrong.