More vertical scrolling questions

STOS-related stuff in here please
Post Reply
User avatar
darklight
Captain Atari
Captain Atari
Posts: 309
Joined: Mon May 08, 2006 7:53 pm
Location: Brisbane
Contact:

More vertical scrolling questions

Post by darklight »

Hi,

I read the other thread about a vertically scrolling shootemup. I'm particularly interested in how to do the hardware scrolling, but I have more constraints. I want my code to:

- Work on all STs (no STE, no blitter)
- 'Hardware' scroll between two screens stacked on top of each other

I think I get the logic behind this - reserve two screens right next to each other in memory, and I guess I can inc/dec the position of the screen pointer by multiples of 320 pixels to scroll up or down. I'm very confused on how to actually do this though. Its been far too long since I played with STOS, looking a the manual again I dont really understand the different screens (logic, physic etc). And someone recommended double buffering - how would this work?

If anyone can give me some pointers to figure this out I'd appreciate it.
Storm Clouds over the Western Front - my WW1 2D dogfighting game for windows
2D Flight Sims - side scrolling aerial combat games
seedy1812
Atari maniac
Atari maniac
Posts: 94
Joined: Tue May 18, 2010 2:04 pm

Re: More vertical scrolling questions

Post by seedy1812 »

I think you have forgotten that the STE has hardware scrolling and the previous ST's did not.
User avatar
darklight
Captain Atari
Captain Atari
Posts: 309
Joined: Mon May 08, 2006 7:53 pm
Location: Brisbane
Contact:

Re: More vertical scrolling questions

Post by darklight »

Ok perhaps hardware scrolling is not the exact phrase, hence I used the quotes. I believe that this simple scrolling trick I outlined above works on all STs. Nothing is actually being scrolled, the screen memory pointer is just being moved - a much less processor intensive operation.
Storm Clouds over the Western Front - my WW1 2D dogfighting game for windows
2D Flight Sims - side scrolling aerial combat games
User avatar
prog99
Captain Atari
Captain Atari
Posts: 179
Joined: Thu Jun 19, 2003 8:08 pm
Location: Ross & Cromarty
Contact:

Re: More vertical scrolling questions

Post by prog99 »

Screen pointer has to be on a 256 byte boundary so your cunning plan wont work.
All my real skills are undervalued
User avatar
darklight
Captain Atari
Captain Atari
Posts: 309
Joined: Mon May 08, 2006 7:53 pm
Location: Brisbane
Contact:

Re: More vertical scrolling questions

Post by darklight »

Yikes have I had a wrong assumption all this time?

A google session tells me SyncScroll could set the screen address to finer values than 256 byte boundaries, but obviously that is out of reach of STOS. Unless... extensions? Are there any STfm compatible extensions that allow this sort of thing?

Or am I just barking up the wrong tree here, maybe even just plain barking mad? Maybe I need to forget the poor STfm and go STe only?
Storm Clouds over the Western Front - my WW1 2D dogfighting game for windows
2D Flight Sims - side scrolling aerial combat games
User avatar
thomas3
Captain Atari
Captain Atari
Posts: 400
Joined: Tue Apr 11, 2017 8:57 pm

Re: More vertical scrolling questions

Post by thomas3 »

Hey.
Look down on the forum. I made a sync scroll module for STOS which does exactly what you want :)
joska
Hardware Guru
Hardware Guru
Posts: 5935
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: More vertical scrolling questions

Post by joska »

prog99 wrote: Fri Jun 18, 2021 9:41 pm Screen pointer has to be on a 256 byte boundary so your cunning plan wont work.
Unless you scroll 5 lines. With 5 buffers you can have smooth vertical scrolling on a plain ST by simply changing the screenpointer. This will of course eat RAM. On an STE you'll need 256Kb for double-buffering a double-height screen. On an ST you would need 640Kb just for the screenbuffers to do the same.
Jo Even

VanillaMiNT - Falcon060 - Milan060 - Falcon040 - MIST - Mega STE - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
User avatar
thomas3
Captain Atari
Captain Atari
Posts: 400
Joined: Tue Apr 11, 2017 8:57 pm

Re: More vertical scrolling questions

Post by thomas3 »

joska wrote: Sat Jun 19, 2021 9:30 am
prog99 wrote: Fri Jun 18, 2021 9:41 pm Screen pointer has to be on a 256 byte boundary so your cunning plan wont work.
Unless you scroll 5 lines. With 5 buffers you can have smooth vertical scrolling on a plain ST by simply changing the screenpointer. This will of course eat RAM. On an STE you'll need 256Kb for double-buffering a double-height screen. On an ST you would need 640Kb just for the screenbuffers to do the same.
This only works with 8 lines - 1280 is the first meaningful multiple of 256...
joska
Hardware Guru
Hardware Guru
Posts: 5935
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: More vertical scrolling questions

Post by joska »

You are of course right. So single line scrolling would be too memory-consuming in most cases. But two lines would not be so bad.
Jo Even

VanillaMiNT - Falcon060 - Milan060 - Falcon040 - MIST - Mega STE - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
User avatar
darklight
Captain Atari
Captain Atari
Posts: 309
Joined: Mon May 08, 2006 7:53 pm
Location: Brisbane
Contact:

Re: More vertical scrolling questions

Post by darklight »

thomas3 wrote: Sat Jun 19, 2021 12:05 am Hey.
Look down on the forum. I made a sync scroll module for STOS which does exactly what you want :)
Hi thomas3 - woah that is exactly what I'm talking about :) At first I couldnt get it to work, I was getting weird "extension #Q" keywords in the code, but I think this is because I didnt have the missing link extension installed (I see you say you were using it). I commented them out / changed them to use jup / jdown, and it worked after that.

Now another question - I see sprites dont work with this method. Are syncscroll and sprites possible?
Storm Clouds over the Western Front - my WW1 2D dogfighting game for windows
2D Flight Sims - side scrolling aerial combat games
User avatar
calimero
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2639
Joined: Thu Sep 15, 2005 10:01 am
Location: Serbia
Contact:

Re: More vertical scrolling questions

Post by calimero »

Why there is 256 byte boundaries in ST for video address?

Some register for setting/holding value of screen address is only 8bit?
using Atari since 1986.http://wet.atari.orghttp://milan.kovac.cc/atari/software/ ・ Atari Falcon030/CT63/SV ・ Atari STe ・ Atari Mega4/MegaFile30/SM124 ・ Amiga 1200/PPC ・ Amiga 500 ・ C64 ・ ZX Spectrum ・ RPi ・ MagiC! ・ MiNT 1.18 ・ OS X
User avatar
thomas3
Captain Atari
Captain Atari
Posts: 400
Joined: Tue Apr 11, 2017 8:57 pm

Re: More vertical scrolling questions

Post by thomas3 »

The video address counter (which updates as the electron beam moves) is three bytes (high/medium/low). This takes its value each vbl from the video address pointer, but this is only two bytes (corresponding to high/medium of the video address counter). The low byte of the counter just starts from zero each vbl - i.e., the video address pointer has no low byte, hence is a 256b multiple.

Someone smarter than me can probably tell you why it was implemented this way...
simonsunnyboy
Forum Administrator
Forum Administrator
Posts: 5834
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: More vertical scrolling questions

Post by simonsunnyboy »

Probably saved some gates in the shifter and not to mention that the original ST design didn't want to be a game machine but a Macintosh competitor (which it did with bravo).
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Post Reply

Return to “STOS”