I want to change the colors that the calculator uses when printing things to the screen, but I'm not sure where to begin. On the TI84+CE, my goal is to get the home screen to be, for example, blue, instead of the normal white.

On another note, is it possible to do this directly from C? And if not, how would I run assembly code from a C program?
i dont think that is possible in basic, but maybe in C?
It's definitely not possible with TIBASIC. I assumed it was only possible with ez80, but a way to do it in just C would be great because I do not have very much experience with asm.

Code:
os_TextBGcolor = 0xFFFF; // set text background color (565 color)
os_TextFGcolor = 0xAAAA; // set text foreground color (565 color)


But you could just use the graphx library if you wanted to do actual graphics.
Are you attempting to print text inside of a program, or change the colors used by the OS when your program is not running?
Hmm, that doesn't seem to be working for me. I'm probably doing something blatantly wrong.


Code:

#include <tice.h>

int main(void)
{
    os_TextBGcolor = 0x6E07;
    os_TextFGcolor = 0x299A;

    return 0;
}


I'm trying to edit the text color outside of any program being run.
chickensaver wrote:
I'm trying to edit the text color outside of any program being run.

This is impossible. The OS writes its own colors.
What do you mean by that? Would it be possible to edit a color palette that the OS pulls from (if that's the case), or is it literally impossible to affect anything the OS does?
The OS isn't using a palette to draw to the screen. The LCD is in the 565 RGB color mode, which does not use palettization. The actual color values themselves are stored inside the OS, which can't be modified without the calc becoming inoperable after a reset.

You can affect the LCD controllers' parameters to a certain degree, but most of the things that you can modify are either completely unrelated to color or would prevent the OS from displaying anything intelligible. You can invert the colors, however - there should be code floating around for that; if not, I can either find it or rewrite it for you.

Your best bet might be to use an OS hook, which is a TI-OS feature that allows you to intercept when certain events in the OS occur and run your own code. You could use the localization hook to draw your own text, which you could make any color, and then use another hook (probably either homescreen or cursor - you'd have to look through the list) to replace all the white pixels on the screen with blue each time it scrolls. There's not really a user-friendly way to use hooks at this point, however - if one program uses a hook, it prevents all other programs from using that hook. I'm currently working on a program that will hopefully fix that issue, as well as making it simpler for people to install hooks. You'll still have to write hooks in assembly, however - the linker used in the C toolchain doesn't support them.
commandblockguy wrote:
You can invert the colors, however - there should be code floating around for that;


Video tutorial: https://youtu.be/9QrJQfGmuYo
Shameless self-advertisement Razz

Topic: https://www.cemetech.net/forum/viewtopic.php?t=16118&start=0
  
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 1
» All times are UTC - 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

 

Advertisement