I have been looking for this for a while, I want to know the hex code for inverting text on the TI 84 CE. Using the Monochrome hex code just resets my calculator for some reason. If anyone knows the code or a list of codes that could help me in the future, please let me know.
Using the monochrome hex code resets your calculator because:
a) The TI-84 Plus CE has an eZ80 processor (which is assembly stuff).
b) The color TI-84s have completely different hex codes because of the differences in the screen, with a lot more pixels and also there is color.

I wish I could help, but I want to learn some hex codes to do stuff too, and I have no experience with assembly on my TI-84+CSE or my TI-84+CE. Sorry.
Readroof forgot to add that the monochromes, and the CSE run on the z80, not like the CE, which runs on the ez80 as he said above.

Just clarifying things Smile
However, the hex codes for monochrome calculators are different for both because of my second reason, and because this topic is about TI-84+CE, I didn't think I needed to mention it. But Unicorn is correct, and so the hex codes are different for the monochrome TI-84s, the TI-84+CSE, and the TI-84+CE.
I first read that as asking to invert the screen, not just text. But I wrote the code anyway, so here it is:


   ld   de, 320 * 240 * 2 + 0D40000h
   ld   hl, 0D40000h
   ld   a, (hl)
   xor   0FFh
   ld   (hl), a
   inc   hl
   sbc   hl, de
   add   hl, de
   jr   nz, loop

Then I saw you wanted inverse text. You can use nearly the same code to invert text on the CE as on the TI-83+. You just need to convert it to 24-bit mode and adjust the location a bit:


   ld   hl, 0D00085h
   ld   a, 08
   xor   (hl)
   ld   (hl), a

The reason that the B&W code to enable lowercase is still the same is that TI didn't move the flags around, relative to IY. However, the code to toggle inverse text doesn't use IY. Instead, it has the RAM location hard-coded. You can, however, make a universal hex code to toggle inverse text that works on the TI-83+/SE, TI-84+/SE, TI-84+CSE, and TI-84+CE, by directly using IY. It's slightly slower, but given the overhead of BASIC calling out to an external library, the speed difference is negligible. So here's the universal hex code:


   ld   a, (iy + 5)
   xor   08
   ld   (iy + 5), a
Nice work Doc Smile.
Thank You Very Happy Good Idea
Ok, so this worked Perfectly, so thank you again, but the main reason I wanted this was for a blinking courser. The problem is that the courser appears once then goes away like it is supposed to, but leaves a black outline. Help?

Heres my code:(I know it isn't the best way to do it, but I am still learning this stuff)

Lbl H
prgmPause (A program that pauses for about a second)
Asm(prgmInvert (The program you gave me)
Output(1,1," "
Goto H

Any ideas?
That's actually not a bug. The OS is applying a sort of "weight" function to the inverted text depending on whether the text next to it is inverted. Basically, inverted text gets a bit of an outline so that the pixels on the edge of each glyph always have an inverted outline around them, as that looks better. (This is mainly a legacy from the low-resolution B&W displays, where not having that outline would make some letters like L and M not display right if they were at the start of inverted text, because the left edge, when inverted, would be white, and so would the non-inverted pixels farther left.) However, this isn't done to non-inverted text, so when you try to overwrite an inverted cursor with a non-inverted cursor, it doesn't overwrite the outline. I'm not really sure what to do about that.

Maybe someone should look into how to set the background color for displayed text, so instead of using inverse text, you would just display a space with the background set to black instead of white.

Another option would be to manually turn on the cursor. The cursor is handled in an interrupt, so it can blink while your code is busy doing its thing. I guess . . . I'll look into that.
Here's some helpful calls I found, if anyone wants to use them:

Also, some more information:
Set this flag to use colors: ( If you don't use the system calls )

 set PutMapUseColor,(iy + PutMapFlags)

In addition, here are the locations for the text colors, if you just want to load them directly, since the calls are pretty much useless, but since it is a linear addressing space, it is a good idea to use the calls if RAM locations move around:

Each is two bytes, 16 bit color as per the wiki. 'text' is home screen font, 'draw' is small font. Hope this is a bit of help. Smile

textBGcolor      equ 0D02688h
textFGcolor      equ 0D0268Ah

drawBGColor      equ 0D026AAh
drawFGColor      equ 0D026ACh
drawColorCode      equ 0D026AEh
This looks helpful, but honestly I barely understand what you are saying. I know almost nothing in assembly, and I was just planning to make a TI basic program that would call other asm programs that were hex. So, in other words, I have no idea what to do with the info you gave me.
DrDnar, or someone else, if you have a chance, could you script up a quick program to alter the font text with the info I provided? I unfortunately do not have access to an assembler right now, or a computer for that matter. Thanks Smile You should have everything you need.
I made an entire library that can set text colors, toggle the cursor, toggle inverse text, and display custom glyphs, just for you. I spent all afternoon working on this, so you'd better like it.

But seriously, we need more of this sort thing, amirite?
Tottaly. Would you mind if I added these routines to the C library that I am constructing? Thanks again DrDnar for your assistance. Smile
That sounds like a great idea. But pay attention to the endianness on IndexToColor and ColorToIndex, as well as RGB/BGR mode.
Meh, I feel like we might want to move this to another thread, but there should be some sort of standard, at least so people don't become too confused. I'll come up with some ideas later on, if needed, and post. Smile Oh, and to andressevilla, a big thank you should go to DrDnar. Smile
THANK YOU SO MUCH!!! Very Happy You programmed in a ton of stuff that I didn't ask for, but they are a huge help in program! Razz And I agree, we need more stuff like this. After this, I hope to start learning asm. Thank You!!! Very Happy Very Happy Razz
DrDnar wrote:
I made an entire library that can set text colors, toggle the cursor, toggle inverse text, and display custom glyphs, just for you. I spent all afternoon working on this, so you'd better like it.

But seriously, we need more of this sort thing, amirite?
That is great news. This library could be handy if people decide to port Celtic 2 CSE games to the TI-84+CE Smile
Later today, I'll post an update with a few new functions. They are: GetColors (returns both FG and BG colors), SetColor, NumToStr (does what it says), GetQuote (returns a string with the " character), and GetStore (returns a string of the -> character). I just need to find _FormReal/_FormEReal to make the string. Also, I don't know if it's documented how to make a temporary variable, and there's no pTempCnt equate in the CE include file, and, well, I'm kind of guessing about how to manage pTempCnt. But this seems to work:

; Creates a temporary string variable.
; Inputs:
;  - DE: Size
; Outputs:
;  - HL: Pointer to VAT entry
;  - DE: Pointer to data
;  - OP4: Name of temporary item.
;    You can B_CALL(_OP4ToOP1) and then B_CALL(_StoAns) to store it to Ans.
; Destroys:
;  - Assume all
   ld   hl, '$' | (StrngObj << 8)
#ifndef   TI84PCSE
   ld.sis   (0FFFFh & OP1), hl
   ld.sis   hl, (0FFFFh & pTempCnt)
   ld.sis   (0FFFFh & (OP1 + 2)), hl
   inc   hl
   ld.sis   (0FFFFh & pTempCnt), hl
   ld   (OP1), hl
   ld   hl, (pTempCnt)
   ld   (OP1 + 2), hl
   inc   hl
   ld   (pTempCnt), hl
   ex   de, hl
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 3
» All times are GMT - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum