![]() |
Forum Index : Microcontroller and PC projects : PicoMite VGA Text Scrolling
Author | Message | ||||
Mark Regular Member ![]() Joined: 26/11/2022 Location: United StatesPosts: 85 |
This is with MMBasic 5.08. Is it possible to scroll (left, right, up and down) colored text with a VGA MODE 1 display (640 by 480)? The Sprite Read and Write commands can be used to scroll the text but the text color layer isn't changed, so the color stays with what was there before. Is there a way to manipulate the text color layer when scrolling text? Mark Edited 2024-12-25 23:05 by Mark |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1576 |
From manual (p68): I would start with that. Michael causality ≠ correlation ≠ coincidence |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1220 |
you can use the Tile command to recolor areas of the Monocrome Screen. Edited 2024-12-25 23:20 by Martin H. 'no comment |
||||
Mark Regular Member ![]() Joined: 26/11/2022 Location: United StatesPosts: 85 |
Thanks for the suggestion on BLIT. From what I can tell in MMBasic 5.08, BLIT and SPRITEs are the same. That's changed in 6.0 and BLIT's would be more appropriate with that version. Thanks for the tip on TILE. I hadn't found that command. Now the question is can the existing TILE data be read and manipulated directly? Mark |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5058 |
The game Flappy Bird side scrolls the screen. Similar texr can be scrolled. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mark Regular Member ![]() Joined: 26/11/2022 Location: United StatesPosts: 85 |
Thanks for the Flappy Birds pointer. I've looked at the code. I haven't shared all my requirements. While sprites can be used to scroll the entire screen, I really want to scroll text within a rectangle. For example, I'd like to have fixed non-scrolling title row(s) at the top and status row(s) at the bottom. It would be nice to have non-scrolling column(s) at the left and right. The SPRITE SCROLL command used in flappy birds. Even with full screen scrolling, the SPRITE method isn't as smooth as the scrolling with LIST ALL. I used the SPRITE method and LIST ALL with a 721 line program file. LIST all did it in about 12 seconds and the SPRITE method was 14. The LIST ALL text appears smoother. Is there a way to use the scrolling used by LIST ALL? If so, can it be used to scroll less than full screen. Please don't take my question as a negative comment or even a feature request. I'm just trying to figure what can be done with the existing MMBASIC. Mark |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5058 |
Mark, You can print your text on layer N (normal visual layer), and the columns on layer L. Layer L should have a "window" to layer N using the transparent color for layer L. If you now scroll layer N, only the text visible through the window will scroll. Maybe you need a extra task to refresh the text before it is visible. Flappy bird uses a similar system, only it scrolls the foreground (posts) left, and the background (buildings) right (slower). List all is a single command. Sprite Scroll needs to be controlled from MMBasic (in a loop). The interpreter makes it slower. But if you scroll 720 lines in 14 seconds, that is too fast. The text will not be readable for humans. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mark Regular Member ![]() Joined: 26/11/2022 Location: United StatesPosts: 85 |
I think I figured it out. MM.INFO(WRITEBUFF) gives the address of the screen. This can be used with MEMORY COPY to move text around on the screen. Of course it keeps the colors set by the previous TILEs. Mark |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |