Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: tifreak on June 24, 2013, 03:35:57 pm

Title: Presidential Database CSE
Post by: tifreak on June 24, 2013, 03:35:57 pm
I figured this is far enough along now, that I should announce this here:

Quote
For the last little while, I've been toying with this idea. And now that Celtic2 has some sprite displaying support, it's coming closer to a reality!

The idea for this project is to have a general database of presidents' pictures, names, dates, important facts, etc to have in a portable manner for students in history class!

Don't believe me? Well, here's what I've gotten done, after Kerm pointed out SC's abilities which was extremely helpful.

(http://tifreakware.net/tifreak8x/president_database/pres1c.gif) (http://tifreakware.net/tifreak8x/president_database/pres2.gif) (http://tifreakware.net/tifreak8x/president_database/pres3.gif)

(http://tifreakware.net/tifreak8x/president_database/pres4.gif) (http://tifreakware.net/tifreak8x/president_database/pres5.gif) (http://tifreakware.net/tifreak8x/president_database/pres6.gif)

(http://tifreakware.net/tifreak8x/president_database/pres7.gif) (http://tifreakware.net/tifreak8x/president_database/pres8.gif) (http://tifreakware.net/tifreak8x/president_database/pres9.gif)

(http://tifreakware.net/tifreak8x/president_database/pres10.gif) (http://tifreakware.net/tifreak8x/president_database/pres11.gif) (http://tifreakware.net/tifreak8x/president_database/pres12.gif)

(http://tifreakware.net/tifreak8x/president_database/pres13.gif) (http://tifreakware.net/tifreak8x/president_database/pres14.gif) (http://tifreakware.net/tifreak8x/president_database/pres15.gif)

(http://tifreakware.net/tifreak8x/president_database/pres16.gif) (http://tifreakware.net/tifreak8x/president_database/pres17.gif) (http://tifreakware.net/tifreak8x/president_database/pres18.gif)


(http://tifreakware.net/tifreak8x/president_database/pres19.gif) (http://tifreakware.net/tifreak8x/president_database/pres20.gif) (http://tifreakware.net/tifreak8x/president_database/pres21.gif)

(http://tifreakware.net/tifreak8x/president_database/pres22.gif) (http://tifreakware.net/tifreak8x/president_database/pres23.gif) (http://tifreakware.net/tifreak8x/president_database/pres22.gif)

(http://tifreakware.net/tifreak8x/president_database/pres25.gif) (http://tifreakware.net/tifreak8x/president_database/pres26.gif) (http://tifreakware.net/tifreak8x/president_database/pres27.gif)

(http://tifreakware.net/tifreak8x/president_database/pres28.gif) (http://tifreakware.net/tifreak8x/president_database/pres29.gif) (http://tifreakware.net/tifreak8x/president_database/pres30.gif)

(http://tifreakware.net/tifreak8x/president_database/pres31.gif) (http://tifreakware.net/tifreak8x/president_database/pres32.gif) (http://tifreakware.net/tifreak8x/president_database/pres33.gif)

(http://tifreakware.net/tifreak8x/president_database/pres34.gif) (http://tifreakware.net/tifreak8x/president_database/pres35.gif) (http://tifreakware.net/tifreak8x/president_database/pres36.gif)

(http://tifreakware.net/tifreak8x/president_database/pres37.gif) (http://tifreakware.net/tifreak8x/president_database/pres38.gif) (http://tifreakware.net/tifreak8x/president_database/pres39.gif)

(http://tifreakware.net/tifreak8x/president_database/pres40.gif) (http://tifreakware.net/tifreak8x/president_database/pres41.gif) (http://tifreakware.net/tifreak8x/president_database/pres42.gif)

(http://tifreakware.net/tifreak8x/president_database/pres43.gif) (http://tifreakware.net/tifreak8x/president_database/pres44.gif)


Now, this is going to be as non-biased as I can make things, I'd like to stick to factual events that have been documented.

Right now, I'm using wiki for the pictures, found here: http://en.wikipedia.org/wiki/List_of_Presidents_of_the_United_States

I'd love feedback for this project. Anything you'd like to contribute to facts on each president would be wonderful. Anyone that is a history buff and would like to contribute information for each president would be very helpful.

I'm currently working on each of the pictures, and hope to have them all completed later today. :)

And some new screenshots taken early this morning to show off the flash card system and the title screen:

(http://tifreakware.net/tifreak8x/president_database/TITLE.GIF) (http://tifreakware.net/tifreak8x/president_database/RIGHTANSWER.GIF) (http://tifreakware.net/tifreak8x/president_database/WRONGANSWER.GIF)

I plan on adding bits of facts and data about each president that I get from wikipedia. I just have to figure out what specific bits of data I want to include, what's important, etc.

What do you all think?
Title: Re: Presidential Database CSE
Post by: DrDnar on June 24, 2013, 04:22:39 pm
My two comments are first, that a more advanced assembly library would provide better pictures, although they wouldn't be saved to the graph buffer properly; and, second, that you should consider using two spaces in a row everywhere for better readability. (The 2001 app SDK makes the same recommendation.)
Title: Re: Presidential Database CSE
Post by: tifreak on June 24, 2013, 04:36:13 pm
Wow, sounds like they don't want much information displayed at once. :< Sadly, with how much data I'm eventually going to be putting in on this, 2 spaces between characters aren't going to be possible, since it's going to have a lot of history for each president posted.

As to the better sprites, you are right, however, you'd be doubling to tripling the size of my sprite data, which is already massive. I'm sitting at 261KB just in sprite data for those 44 presidents. I'm looking at roughly that much or a hair bit more for the information for all of them.

I appreciate the suggestions. Just neither of them will be easily done with how things are being put together.
Title: Re: Presidential Database CSE
Post by: DrDnar on June 24, 2013, 04:43:13 pm
As to the better sprites, you are right, however, you'd be doubling to tripling the size of my sprite data, which is already massive. I'm sitting at 261KB just in sprite data for those 44 presidents. I'm looking at roughly that much or a hair bit more for the information for all of them.
If I had time, I'd love to offer my services for compression. A lossy image compression algorithm could compress all those images with good quality 32-level gray-scale to less than 64 K, at the expense of decoding speed. Sadly, I probably don't have time to learn, implement, and optimize a DCT + Huffman algorithm, but hopefully somebody else does.
Title: Re: Presidential Database CSE
Post by: DJ Omnimaga on June 24, 2013, 04:46:55 pm
I saw this on Cemetech before and liked it a lot. The layout is great and it isn't too fancy either. Picture conversion is very good too. (Although for some reasons, GIF compression is strange. Did you use MS Paint ???)

By the way I tried colorizing some faces with another software using a pic that had no Paint dithering, just to see how it would look like. Plain colors were too bright, while with dithering it was a bit too weird. So grayscale is better I think.
Title: Re: Presidential Database CSE
Post by: tifreak on June 24, 2013, 04:51:26 pm
DrDnar: Thanks for the thought. Sadly, Celtic2 does take a couple of seconds already to display the screen, probably because it has to recall a massive string then dump it to the screen.

DJ: Yeah, colors just don't work for all the real world stuff that we need, so greyscale it will have to stay for a while. :<

And no, I used Paint Tool SAI to save as .pngs. I just didn't fight with all the settings, just made them black and white and parsed. </lazy>

lol
Title: Re: Presidential Database CSE
Post by: DJ Omnimaga on June 24, 2013, 04:53:34 pm
Ah I see about the pics. It seems Paint Tool SAI does a similar job as MS Paint for 256 color conversion  <_<. Oh well, I got a good idea of your program already and you had posted pics with no such dithering afterward anyway so I got an even better idea of how it looks like. :)
Title: Re: Presidential Database CSE
Post by: tr1p1ea on June 24, 2013, 07:55:46 pm
It would seem a shame to not be able to make use of colour on the 84C for some of these images.
Title: Re: Presidential Database CSE
Post by: DJ Omnimaga on June 24, 2013, 08:08:56 pm
Just remember one thing, though: A lot of those images were originally black and white because of how old they are, so adding colors would be hard without knowing the clothes colors and such stuff. :P

On a side note, tifreak8x now holds the distinction of having created the first flicker-less grayscale program ever in pure TI-BASIC. :P
Title: Re: Presidential Database CSE
Post by: tr1p1ea on June 25, 2013, 02:28:09 am
You are correct that there isnt room for much gray in a 256 standard colour pal. That being said since most of the colours in all images are very similar, you could have 192 colours and 64 grays - using a global 256 colour palette and an 8-bit index per pixel?
Title: Re: Presidential Database CSE
Post by: DJ Omnimaga on June 25, 2013, 03:27:54 am
Well in his case he's using pure BASIC, meaning he only has access to 15 colors (including 6 shades of grayscale including white and black)
Title: Re: Presidential Database CSE
Post by: tifreak on June 25, 2013, 04:44:38 am
DJ Is correct, this is a mostly BASIC, using Celtic2 that Kerm has been working on porting for the CSE.
Title: Re: Presidential Database CSE
Post by: Xeda112358 on June 25, 2013, 09:24:37 am
There is xLIB CSE that makes use of a pallet and it might be possible to adapt the pallet to be customisable.

Also, how many colors do you have currently? If you are using 16 colors, then it would actually be pretty easy to compress the pics to half their size without any data loss. (1 nibble can hold a value from 0 to 15).
Title: Re: Presidential Database CSE
Post by: tifreak on June 25, 2013, 09:55:15 am
I haven't really seen what else xlib CSE does, as I just found out about its existence yesterday. And it's being stored in hex, 1-F for the 15 colors available in BASIC. I also know nothing about compression and decompression.
Title: Re: Presidential Database CSE
Post by: DJ Omnimaga on June 25, 2013, 12:42:21 pm
Oh wait I didn't realize that this used Celtic II lol. I guess this makes sense, since otherwise your program would be absolutely massive (if using like 40 pics that takes 21956 bytes each) and sending it with TI-Connect would be a major PITA (hacked pic vars). Is it limited to 15 BASIC colors or did you just decide to use these colors?

Also I wouldn't recommend xLIB for such program (not that it's even out yet anyway), because while it uses 256 colors, it uses a resolution of 160x120 (scaled up vertically, while the screen is set in 160x240 mode) and the way stuff is drawn with xLIB would make it a major pain to display pure BASIC stuff like text. (everytime you would update the LCD content using xLIB commands, the text would flicker, since xLIB alternates between the 1st and 2nd half of the GRAM when using commands to update the screen content), so in 320x240 mode (or in jsTIfied, which lacks 160x240 support), this is how an xLIB game would look like:

(http://i04.img-up.net/13717402382c74.gif)

 xLIB CSE is aimed directly at game dev for BASIC programmers but tries to do some compromises to keep speed at a decent level. It also aims at making it easier to port older games I think.
Title: Re: Presidential Database CSE
Post by: tifreak on June 25, 2013, 02:05:44 pm
The CSE only has 15 colors accessible from BASIC :)

Sadly, I'd love to have more, but since it won't give them to me, the few colors (black, white, greys) will have to do. :< At least they look good and recognizable to me, so hopefully they do to others as well.
Title: Re: Presidential Database CSE
Post by: DJ Omnimaga on June 25, 2013, 04:10:53 pm
Yeah, but wouldn't Celtic II be easy to modify to support more, since it's written in ASM? Or did Kerm keep it to 15 colors for speed/size reasons? Not that it's a bad thing, though (since it's possible to do nice looking stuff), but just wondering.
Title: Re: Presidential Database CSE
Post by: tifreak on June 25, 2013, 05:37:51 pm
That's something you'd have to drop in the Celtic topic on Cemetech, I haven't the slightest idea.
Title: Re: Presidential Database CSE
Post by: DJ Omnimaga on June 25, 2013, 06:11:45 pm
Ok thanks. I'll try to ask there when I get some more free time. :)
Title: Re: Presidential Database CSE
Post by: Sorunome on June 26, 2013, 06:03:35 pm
wow, looking pretty nice, looks like a lot of work too to get all the presidents in there....and then you need to update it every 4 years ^^
Title: Re: Presidential Database CSE
Post by: tifreak on June 27, 2013, 07:35:39 am
It won't be too bad once I get all the data entered in for the current 44. Then I'll have a schema set up specifically and I'll know what to add that's important :)

Thanks for the compliment!