A lot of my images are in the 70 wide range, so yeah, it takes up a loooot more space that way. But.. I'm really impressed, as I thought it would take 3 bytes per pixel to determine colors? I'd really love to see the data and how it's stored.

Plus, I stored each of the presidents image data on separate lines.

If you'd be willing to shoot the program/data my way, can hit me up on email: tifreak8x@hotmail.com Quite fascinated with how you stored that image data..

And no, I don't have any text data for the presidents entered yet. lol That was 95% image data for my program size :p
16 colors means he's probably using a palette (similar to gif). So you store a color table once - I think 320 bits = 80 bytes, and then just use a 4 bit code (one hex digit) to represent each pixel. Although in BASIC that would have to double since all of the hex characters are themselves a byte.
That's exactly it elfprince13. The asm program itself will store the palette and the location of the app vars storing the images. The palette is actually just 32 bytes because you can define a color in two bytes. And yeah, store each pixel in 4 bits. So the 5,120 pixel image can be stored in 2,560 bytes uncompressed. Technically you can compress it and either pad each image to the length of the longest image so each offset is identical or create a jump table for each image. I think that storing the current presidents in 2 app vars uncompressed is reasonable though. (I will put some thought into the jump table.) The asm program will also contain the code to load the app var and display the correct president. I will write a separate update program so that you can use IViewers image converter to add new presidents or other images as necessary. They will have to be the same size as the current images (64x80) pixels and will display off the original palette.
That's exactly what my sprite code does, except that the 16-color palette is the one that the OS uses (and one color is transparency). I'm surprised that you claim your program can get a 2x speedup over mine.
Its just a test, it will get slower as I add more to it. Heres a video though http://www.youtube.com/watch?v=r5c988NFGsk

What is the transparency? I was thinking of setting $0000 to be transparent (in the program it would actually just skip a write) and have $0020 be known as black.
assemblybandit wrote:
Its just a test, it will get slower as I add more to it. Heres a video though http://www.youtube.com/watch?v=r5c988NFGsk

What is the transparency? I was thinking of setting $0000 to be transparent (in the program it would actually just skip a write) and have $0020 be known as black.
I suspect the slowdown you see is just the overhead of loading the 1500 bytes of the Celtic 2 CSE program into RAM, which is why this is mostly just a prototype of the hooked libs that will be available in Doors CS 8. Your program is presumably substantially smaller, since it only contains a sprite-copy routine. Also, does your sprite routine write to both the graph buffer and the screen? If it doesn't, going to the homescreen and back to the graphscreen will make the drawn sprites disappear. I write to both, which is why I'm restricted to TI's own palette.
No, it doesn't write to the buffer, I never even tried switching screens! A problem I had with IViewer, as an app jforcecmdnochar will reset the screen for me. As a program, I don't know the bcall to force a screen refresh so in areas the homescreen didn't update, the image would still be present after exiting. I think that some BASIC programs could get by without switching the screens though.
assemblybandit wrote:
As a program, I don't know the bcall to force a screen refresh so in areas the homescreen didn't update, the image would still be present after exiting.

This is the MicrOS code for fixing the screen when exiting.

Code:
   rst   28h   ;b_call(_DrawStatusBarInfo)
   .dw   555Ah
   rst   28h   ;b_call(_DrawStatusBar)
   .dw   54F4h
   rst   28h   ;b_call(_maybe_ClrScrn)
   .dw   4540h
   rst   28h
   .dw   4027h   ;_JForceCmdNoChar

All equates should be in the equates file on WikiTI.
I wonder if BASICBUILDER could be updated to allow the packaging of such a large project?
If you want to take advantage of the color screen, but can only use greyscale images, might I suggest single-color images, perhaps representing the party affiliation of the president shown? It would also be neat if you could show these images in a mosaic, conveying visually how the presidency shifted politically over a given period of time.
I've gone through and updated the images based on the collage of headshots that assemblybandit posted, though I shrunk them down slightly more to be 52x65. This dropped things down to around 150KB in size for picture data, and compressed it into 3 appvars.

Haven't had a time to set up the program to use the new images, hopefully they will look as good or better than the others did. Tried my best to make sure they weren't overly dark. Will post results sometime soon.
Keep up the good work, tifreak8x, and I'm glad this project is still underway. Once the new images are all slotted into place and working, your next job is inputting the factoids about all of the presidents, correct?
Yes, but I still haven't figured out what exactly to put in that would be important and relevant to anyone using this program. Should I just go with the facts of their political career, should I input information from their early life.. I'm somewhat limited on how many characters. I figured I can go with 5k to 6k characters, but that has to include the token that tells my displayer that it is looking at a new line to display.

I also did manage to get the new sprites implemented.


For the second image, had forgotten to load up the appvar that contained the names. Whoops.
So how did the drag-and-drop to Archive in jsTIfied work out for you? Those look like TI-Connect screenshots to me. At any rate, very nice job. Does it pick a random president for the splash screen?
That was jstfied shots, if you look at the run indicator, it's 'thinking'. Once I got firefox to refresh, which was a horrible hassle, it worked there, but I was never able to do drag and drop from chrome. :<

And yes, it still does random images for the splash screen.
Forgot to post that I uploaded a beta for you all to play with!

http://www.cemetech.net/programs/index.php?mode=file&id=921
tifreak8x wrote:
Forgot to post that I uploaded a beta for you all to play with!

http://www.cemetech.net/programs/index.php?mode=file&id=921
This looks great, tifreak8x! Thanks for sharing, and good luck with summarizing and adding all the information about each president!
So, I've updated President Database to utilize 8.1 of DCSE!

And I've started working on adding in data for the program from this page:

http://www.history.com/topics/us-presidents/george-washington



This would be page 1, and then after that, Page 2+ would lack the picture and be pages of text. I'm considering setting the paging system up to use < > as to indicate more pages, maybe even adding in page numbers on the bottom line, instead of the line of text. What do you think? Do you think it would be okay to not have it and add that extra line of text, or should I make it clear where a person is in a document?
I realize I've been absent for most (all?) of this development but perhaps in a new version you can change the color of important events. Such as with George Washington "Continental Army" could be another color or something. I realize it's all truncated to the most important info to begin with but names can be extra helpful.

Keep it up!
  
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 3 of 4
» 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