STE horizontal hardware scroll

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

joefish
Atari maniac
Atari maniac
Posts: 82
Joined: Thu Dec 05, 2013 4:15 pm

Re: STE horizontal hardware scroll

Postby joefish » Fri Jan 19, 2018 3:50 pm

Surely to horizontal scroll, the intention is that you set up a double-width screen and pan from one side to the other, filling in the same thing to both the leading and trailing edge of the viewport. Then when you reach the end of the pan, you jump back to the beginning because at that point both halves of the virtual screen are showing the same thing.

Technically your virtual screen would probably be two screens plus two (or more) tiles in width to disguise the filling-in, but the pan-and-jump-back principal still applies. It takes more memory (two screens) but it's a lot easier to manage. You only have to do that fiddly one-screen roll-around thing if you're sync-scrolling the standard ST screen.

User avatar
thomas3
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 103
Joined: Tue Apr 11, 2017 8:57 pm
Location: the people's republic of south yorkshire, uk.

Re: STE horizontal hardware scroll

Postby thomas3 » Fri Jan 19, 2018 7:38 pm

evil wrote:But enough babble, here's the source:
http://files.dhs.nu/files_source/jury.zip


Thanks for that - I'm just learning, so this is really helpful. Great commenting too :D

But I have a very stupid question - bear with me - this is STE-only source, right? Surely you can't write to the video base like this on an ordinary ST?! (I only have STEEM to try it on).

Thanks!

Zamuel_a
Atari God
Atari God
Posts: 1223
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: STE horizontal hardware scroll

Postby Zamuel_a » Fri Jan 26, 2018 9:46 am

What I did in my Giana sisters STE conversion is that when I enter a new level I setup several screens with all the graphics so that the scroll routine only has to do that and not fill in any new data. I tried that at first, but it takes a lot of processor power to redraw the new 16 pixels that will come into view. If you scroll diagonal you need to draw both horizontal and vertical data so that's even more.

The problem is ofcourse that the hardware scroller can't scroll an infinite wide screen. If you need a wider screen than just 4 * 320 you just have to create a copy of the last screen and put at the beginning of a new memory area that you jump to then you walk past the first 4 screens.

For example, if I need a 7 screen wide playfield I just put them in memory like this:

1 2 3 4 | 4 5 6 7
So I have to waste one 320x200 area with a copy of the last screen in the first buffer but it's not that much memory you loose. 8 screens only take 32k*8 = 256k and it shouldn't be a problem for an STE.
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

jury
Captain Atari
Captain Atari
Posts: 291
Joined: Tue Sep 21, 2004 11:11 am
Location: Poland

Re: STE horizontal hardware scroll

Postby jury » Sat Jan 27, 2018 6:59 pm

Quite neat trick to save processor time.


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 4 guests