Jump to content
IGNORED

window algorithm


Recommended Posts

I am needing to put together a window algorithm for coarse scrolling...maybe it's just me being up at 3:30 in the morning, and my head is mush, but......

 

I have a buffer of 32 values, and I need to display 25 of them on screen at a given time, from top, to bottom, and once it hits the bottom, the window needs to warp back around to the top while part of it is still on the bottom....

 

maybe i'll come up with an answer tomorrow, but.. i wanted to get some input from you guys as well.

 

thanks. :-)

 

-Thom

 

p.s. this is a very difficult challenge for me, because of the limited memory constraints ($FF,x) and stuff...not enough memory..... and I am trying to do the display part of this tight enough to keep the kernel stable.... and i hope i can calculate the new offscreen data for the next 1 or two lines ahead during the overscan or vertical blank....

 

I was thinking something akin to two counters, c2 = c1 + size of buffer & size of buffer ? .... damn I need to go to bed....

Edited by tschak909
Link to comment
Share on other sites

So all you really need to do is reset an index value when it's bumped 32 times? Why not just do this in the display kernal?

 

inc $counter ;5

lda $counter ;3

and #$1F ;2

sta $counter ;3

 

This could be done after each of the 25 bands...and then by loading the value of $counter to an index register, the proper data can be loaded for that band during the kernal portion that displays them.

 

Are you hurting for cycles on every scanline of the display?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...