Scrolling parts of screen

PM development, programming, hacking and all that fun stuff.
Post Reply
User avatar
Pikpol
PM.net Staff
Posts: 39
Joined: May 21st, 2017, 13:37

Scrolling parts of screen

Post by Pikpol »

Hello guys,

So I actually started programming a game/tech demo.
I am using Zoranc's old C compiler.
I got a map drawing as background and a sprite in front of it.
But now I need to get scrolling per scanline working.

First the top part of the map, which is 21 pixels, needs to be scrolled separately from the bottom. But I need control over the scrolling per scanline on the bottom part. I am starting to doubt if this is even possible with the built in scroll registers.

So my question actually is if you can run code per scan line. I did it on the Game Boy, but of course this is a different system and I can't seem to find a counter which can help me achieve what I want.
The best counter I could find is the PRC_CNT, but this one seems not accurate enough.

Hopefully someone can shed some light on this issue :)

Thanks in advance

~pikpol
JustBurn
Team Pokémé
Posts: 90
Joined: April 14th, 2011, 19:07

Re: Scrolling parts of screen

Post by JustBurn »

PRC doesn't render per scanline, there's no such thing in the PM... in fact the CPU is completely halted until the whole screen rendering is completed, that's why the bigger the PRC framerate the least CPU you'll have available.

Also data isn't stored in an common way in the LCD, each byte is a column on a 8px tall strip called a page and each bit is a 1-bit row... so the LCD has 8 pages of 96 bytes each.

if you need a UI kinda like BG Window you can use 6 opaque sprites on the bottom, that will cover up to 16 pixels high...
User avatar
Pikpol
PM.net Staff
Posts: 39
Joined: May 21st, 2017, 13:37

Re: Scrolling parts of screen

Post by Pikpol »

Hey thanks for the info.
I actually need to scroll per scanline so I can make some wavy effects. But I guess I can do the scrolling myself just before it renders to the screen. Will try it when I have time again.

I will also check the Shizzle demo again to see if there is an effect in there which looks similar to what I want to achieve
Post Reply