Volhout Guru
 Joined: 05/03/2018 Location: NetherlandsPosts: 5857 |
| Posted: 08:46am 03 Apr 2025 |
|
|
|
Hi javavi,
Scolling background can be made easier.
In your previous clock you perform these commands to copy data from top of the screen to bottom of the screen.
Blit READ 1, 0,0,MM.HRES,1 Blit 0,1,0,0,MM.HRES,MM.VRES-1 Blit Write 1, 0,MM.VRES-1 Blit Close 1
In PicoMite there is the SPRITE SCROLL command that scrolls a selected layer. This command does the same as the above 4 lines.
Sprite scroll 0,1
The SPRITE SCROLL command can scroll all directions up/down/left/right. Individual, and simultaneous (diagonal).
Regards,
Volhout
P.s. in your later clocks you would replace
If X.Dir=1 Then Blit READ 1, 0,0,1,MM.VRES Blit 1,0,0,0,MM.HRES-1,MM.VRES Blit Write 1, MM.HRES-1,0 Else Blit READ 1, MM.HRES-1,0,1,MM.VRES Blit 0,0,1,0,MM.HRES-1,MM.VRES Blit Write 1, 0,0 EndIf Blit Close 1 If Y.Dir=1 Then Blit READ 1, 0,0,MM.HRES,1 Blit 0,1,0,0,MM.HRES,MM.VRES-1 Blit Write 1, 0,MM.VRES-1 Else Blit READ 1, 0,MM.VRES-1,MM.HRES,1 Blit 0,0,0,1,MM.HRES,MM.VRES-1 Blit Write 1, 0,0 EndIf Blit Close 1
with
Sprite scroll X.Dir,Y.Dir Edited 2025-04-03 19:07 by Volhout |