I just made an awesome discovery. It's possible to effectively halve the horizontal resolution of the screen on the TI-84+CSE, while still filling up the entire area of the screen, which means asm game programmers can double their framerate at a small visual cost.



This will even allow for double-buffering, where you draw to the offscreen area and then swap it in instantly, preventing flickering. My method uses partial images and interlaced output.

More detailed information on how to implement:
Enable two partial images, where one is displayed at column 0 and the other is displayed at column 160. Both partial images should be set to the same 160 columns of GRAM which you want to display. (When enabling the partial images, disable the base image.) Then turn on interlaced output (bit 10 of register 1).
Oh, that makes perfect sense; I can't believe that didn't occur to me sooner. This is a great discovery, calc84maniac! Have you done any tests as to the framerate that it allows yet?

Edit: I should get tr1p1ea to try this out ASAP for his TI-84+CSE tilemapper, and see if it helps the tearing.
So does this mean you get a pixel aspect ratio of 2:1? It seems like in a lot of scenarios taking up half the screen in the middle would be preferable.
elfprince13 wrote:
So does this mean you get a pixel aspect ratio of 2:1? It seems like in a lot of scenarios taking up half the screen in the middle would be preferable.

You can also output the same pixel twice vertically for a 160x120 resolution, but still with the essentially doubled output rate.
That kinda seems like the best option to me Smile Still more than 3x the pixel count of the classic calculators, hopefully 4x the max framerate as compared to full resolution, and no weird pixel ratios.
elfprince13 wrote:
That kinda seems like the best option to me Smile Still more than 3x the pixel count of the classic calculators, hopefully 4x the max framerate as compared to full resolution, and no weird pixel ratios.

Well, I'd think it's still just over 2x the max framerate compared to full resolution, because you still have to do two pixel outputs for a 2x2 pixel, and I say just over 2x because there are fewer pixel lookups from memory. Of course, the specifics boil down to the implementation, but the main thing is that you can rewrite the contents of the entire screen twice as fast.
Great work! My working resolution was going to be 160x120 so this will come in handy and save a lot of cc's + the dbl-buffering option should get rid of any tearing!

Awesome work Smile
tr1p1ea wrote:
Great work! My working resolution was going to be 160x120 so this will come in handy and save a lot of cc's + the dbl-buffering option should get rid of any tearing!

Awesome work Smile
If you happen to have time to give your program another pass, I'd be more than happy to try it again on my calculator. Smile
calc84maniac wrote:
elfprince13 wrote:
That kinda seems like the best option to me Smile Still more than 3x the pixel count of the classic calculators, hopefully 4x the max framerate as compared to full resolution, and no weird pixel ratios.

Well, I'd think it's still just over 2x the max framerate compared to full resolution, because you still have to do two pixel outputs for a 2x2 pixel, and I say just over 2x because there are fewer pixel lookups from memory. Of course, the specifics boil down to the implementation, but the main thing is that you can rewrite the contents of the entire screen twice as fast.


Ah, so the 160x120 isn't vertical interlacing, it's just outputting to 2x1 pixels Smile I misread what you were saying.
Same trick Gran Turismo uses on the PS3 to run at 1080p.

But I question whether that will be enough to get a game to playable framerate given the drastically underpowered hardware and lack of RAM.
This is an awesome discovery, calc84maniac! I personally am fine with double-width pixels if that's what it requires, seeing how many classic old games had those.

@Kllronj: I think that we were able to establish earlier that the best framerate we could get with fullscreen updates was 7 FPS. Doubling the framerate would put it up to 14, which is the low end of good framerates for Flash videos and computer games from the 80s.

EDIT: Oops, read it again: we don't need double-width pixels, just double size. And the possibility of double-buffering/page-flipping is also an excellent prospect - just like on the Apple ][.
5FPS, actually, Compynerd, which now brings us up to 10FPS. Still on the low end for fullscreen things, but once we figure in areas reserved for program/game controls, meters, and interface, we might get it easily to to 14-15FPS range of "smooth" motion.
Here is a small test video showing the technique as well as switching between the 2 areas of GRAM:

http://www.youtube.com/watch?v=D5Vsd3DHCtc

*UPDATE*

Here is a video showing how h-scrolling can be achieved, and its fast! (I needed to add a decent delay for it to even be noticeable!)

http://www.youtube.com/watch?v=ILhSw8p_u0A
Superb work, tr1p1ea! This looks like it will be handy for everything from side-scrollers to scrolling menus. Do you have any target game or application that you want to use this with first?
Nah not targeting anything at the moment, just experimenting really Smile.

EDIT - I have updated the test to draw a tilemap to GRAM and then scroll it since the leftovers from the TI-OS were boring Smile.

http://www.youtube.com/watch?v=9SBx9dXh6Co

Im only testing with tiles and the map drawing is very lazy code wise and unusable for a real project, so i hope i dont get people too excited Sad.

If someone wants to test they can here: Taken down as i found a bug, will reupload.

Please note that this has only been tested once so it may contain bugs or do something crazy so please beware if you try it! Ensure that you back up anything that you are working on!
Too late! We need that as a game now. Smile :p
That looks lovely! Smile
tr1p1ea wrote:
Nah not targeting anything at the moment, just experimenting really Smile.

EDIT - I have updated the test to draw a tilemap to GRAM and then scroll it since the leftovers from the TI-OS were boring Smile.

http://www.youtube.com/watch?v=9SBx9dXh6Co

Im only testing with tiles and the map drawing is very lazy code wise and unusable for a real project, so i hope i dont get people too excited Sad.
Great choice for your test tiles. You say "don't get too excited," but you chose specifically very exciting tiles for your test. Smile
Imagine a colour version of Desolate...
He posted some pictures of something like that in IRC, actually Wink Needless to say, I was quite excited.
  
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 2
» 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