First Spear Posted September 27, 2019 Share Posted September 27, 2019 Please help me think through this idea. A very long text string like this "Pack my box with five dozten liquor jugs. Please understand that this is fairly long! " Put black blocks in all GRAM locations. Assign write GRAM 43 to Bitmap location 220, 44 to 221, 45 to 222, 46 to 223, 47 to 224...239. I want to scroll that string from right to left on a single line, nothing taller than 8 px high. Put that text into a long bitmap graphic, use IntyColor to convert it to a graphic. Read the data that makes up the first 8x8 block, write it to GRAM 43, second 8x8 to GRAM 44, third 8x8 to GRAM 45, etc. up to GRAM 62 going to Backtab #239 Loop reads second block and writes it to GRAM 43, third block to 44, etc. In a loop that should show a scrolling effect. Am I way off here inmy thinking? Thanks. Quote Link to comment Share on other sites More sharing options...
skywaffle Posted September 27, 2019 Share Posted September 27, 2019 That would work, however you could also use the scroll command to shift 8 pixels, and just update the rightmost block. I am not sure which uses more resources, but with that, you could also incorporate smooth scrolling Quote Link to comment Share on other sites More sharing options...
skywaffle Posted September 27, 2019 Share Posted September 27, 2019 (edited) include "constants.bas" for i = 0 to 19 #backtab(220+i) = text(i) * 8 + 7 next i = 18 i2 = 7 start: scroll i2 wait i2 = i2 - 1 if i2 = 255 then i2 = 7 scroll ,,2 i = i + 1 if i > 84 then i = 0 #backtab(239) = text(i) * 8 + 7 end if goto start text: data "Pack my box with five dozen liquor jugs. Please understand that this is fairly long! " Edited September 27, 2019 by skywaffle 1 Quote Link to comment Share on other sites More sharing options...
skywaffle Posted September 27, 2019 Share Posted September 27, 2019 (edited) If you are looking for a title screen and not use any scrolling, your method would work the same, just not smooth: include "constants.bas" start: wait delay = delay + 1 if delay > 10 then delay = 0 i2 = i2 + 1 if i2 > 84 then i2 = 0 end if for i = 0 to 19 i3 = i + i2: if i3 > 84 then i3 = i3 - 85 #backtab(220+i) = text(i3) * 8 + 7 next goto start text: data "Pack my box with five dozen liquor jugs. Please understand that this is fairly long! " Edited September 27, 2019 by skywaffle 1 Quote Link to comment Share on other sites More sharing options...
First Spear Posted September 28, 2019 Author Share Posted September 28, 2019 11 hours ago, skywaffle said: That would work, however you could also use the scroll command to shift 8 pixels, and just update the rightmost block. I am not sure which uses more resources, but with that, you could also incorporate smooth scrolling Thanks Mr. Waffle. What I was thinking of was a hybrid between both of your awesome examples. I like the smooth scroll, but there is no way to only scroll the bottom row of tiles and leave the rest of the screen static, as far as I know. #learning Quote Link to comment Share on other sites More sharing options...
intvnut Posted October 3, 2019 Share Posted October 3, 2019 If you want an actual smooth-scrolling bitmap, scrolling at something less than 8px granularity, and not scroll the rest of the screen, then you'll need to recompute bitmaps shifted over by however many pixels. I've written assembly code to do that in the past. You probably can't get a full 20 tiles across, but you could probably manage 16. 1 Quote Link to comment Share on other sites More sharing options...
skywaffle Posted October 3, 2019 Share Posted October 3, 2019 Is it possible to alter the screen position mid frame? I thought on other consoles, some parallax type effects were achieved through altering the horizontal screen position on different scanlines in between the wait cycle. Quote Link to comment Share on other sites More sharing options...
artrag Posted October 3, 2019 Share Posted October 3, 2019 No, all video registers stay locked during the frame rendering. They return accessible only in vblank. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.