horizontal scrolling on ST

GFA, ASM, STOS, ...

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

User avatar
christos
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2291
Joined: Tue Apr 13, 2004 8:24 pm
Location: Greece
Contact:

Re: horizontal scrolling on ST

Postby christos » Sat Jan 23, 2016 11:01 am

I wouldn't worry about these videos. They are captured so badly that you can't really understand performance. This is much better

https://www.youtube.com/watch?v=omvWvM3svv8
Felix qui potuit rerum cognoscere causas.
My Atari blog

STOT Email address: stot(NoSPAM)atari(DOT)org

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2759
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: horizontal scrolling on ST

Postby AtariZoll » Sat Jan 23, 2016 11:09 am

Usually, when it is recorded on PC with emulator video is jerky. Sometimes capturing from real Atari is not done properly.
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2759
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: horizontal scrolling on ST

Postby AtariZoll » Sat Jan 23, 2016 11:17 am

calimero wrote:in Potsworth screen is scrolled by 4 pixels so all tiles are preshifted two times (right?) and game area is small enough so entire screen can be build from scratch every frame (blited all tiles, than sprites to screen memory from preshifted tiles in memory)? Is it 25fps (I would say so from youtube video)?

Yes, it works that way, as I seen some code segments. Actually, 4px scroll means 4 phases, since Atari ST low res is 16px based - 8 bytes for 16px in 4 bitplanes, 2-2-2-2 bytes. But some have 1px scroll if I saw it properly - like Terry's Big Adventure .
If there is no much different object/tile on map, all it can be preshifted in 16 phases, and can fit in 512KB.
calimero wrote:1px scroll - you can not use preshifting technique since there will be no enough memory, right?

See above. With 4MB RAM you can store complete level bitmaps in 16 phases in RAM. I did it with Hard 'n' Heavy.
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: horizontal scrolling on ST

Postby troed » Thu Feb 11, 2016 6:08 pm

alien wrote:Hi Troed,

I enjoyed your presentation. I wish I could have come to STNICCC... You mentioned you wanted people to jump in with details, so here are the first to come to mind.


Hi Alien! Awesome to have your presence here. I'm very sorry it has taken me a while to respond - I simply used up all available retro time finishing Closure and work & family has needed my full attention until ... well, now.

I believe I mentioned wake states in my articles. I thought it was to do with a "desynchonization of the MMU, the Glue and the Shifter", although some machines never displayed identical problems, suggesting a difference of silicon revisions. But, Paulo & Ijor have certainly deepened our understanding of it since.


I've only ever read the two articles that were translated in the Alive magazine, so anything you wrote in the other two I don't know anything about :) And yes, your descriptions are what made it obvious to me that we were talking about state machines and so everything that had ever been written about "switches" was likely to be wrong. If you look at discussions on emulator development mailing lists it's often posed as "can a right border be opened at cycle X? All demos do it at Y" or "Hmm this demo doesn't switch back to 50Hz and yet expects the lower border to open as well" (SYNC SNYD2 screen btw) etc. All those questions were simply answered by documenting the state machine(s) in more detail.

Also, I did notice the shifted bitplane problem. In fact it was understanding that that lead me to 4bit hardscrolling: I tried it first with non-full-screen images but I couldn't get to work stably for all wake-states and all offsets. That failure lead me to try to recreate the effect in overscan, which took quite a bit of lateral thinking!


Aha! Thanks - and well done for getting the technique into a demo. Redhead/SYNC was on the same track but as with (almost) everything SYNC ever made, "if it wasn't released it doesn't exist" ;)

You have "res == lo" in some of your the state machines, but it would be better res != hi (since the state machine is the same in both low and medium resolution).


You're right, of course. I'm sure there are many such updates that should be made (and anyone is free to make them - I used the wiki for precisely that purpose)

Thanks again, for your presentation. It's wonderful this problem is still interesting to people. And thanks to tin for the other recording. I haven't "seen" Gunstick or ES in a long time. I always wondered why Gunstick used a medium resolution stabilizer!


... and now we know ;) Amazing, actually. Both the Ilja and Gunstick stabilizers managed to do the job in all (GLUE)-wakestates and (Shifter)-substates without actually being tested on the number of machines I would've guess would be needed.

My "new & optimized" fullscreen scanline has its fair share of issues (one I knew about when releasing it, see separate post I'm going to make after this one) and some I didn't know about but others have seen. And I tested it on _many_ machines and in all states I could get them into. But maybe, in another ten years or so, the state of the art when it comes to fullscreens have advanced yet again :D

/Troed

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: horizontal scrolling on ST

Postby troed » Thu Feb 11, 2016 6:36 pm

"every other 16 pixels black" (actually, border color, but let's refer to it as black)

The famous instable Shifter mode, as seen as in the Omega fullscreen, TNT Crew DOTLB, Closure (sometimes .. ) etc. While researching for my optimized fullscreen scanline the big difference between the naïve version;

0: HI
8: 50Hz
16: LO
376: 60Hz

... and the version that is (with wakestate-dependent modification) in Closure:

0: HI
8: MED
16: LO
24: 50Hz
376: 60Hz

... is that the naïve version (while GLUE statemachine compliant) displays "bands" (every other 16 pixels black) in some wakestates or "sub-wakestates" (Shifter being cold, warm or just moody) but the released version doesn't. (Well .. sometimes it does. When releasing the demo I thought it was fully stable on STE and fully stable in 3 out of 4 ST wakestates, and sometimes in the 4th, but now I've heard that isn't always the case .. but I digress).

So. Shifter. The cause for this banded mode - which is what caused Paulo to have to have a key press in his non-fullscreen 4 pixels syncscroll routines to switch between two different unstabilizers - is what I've been looking at doing something about. It obviously is something related to the Shifter (IMHO) and it's something that's very very borderline. Sometimes it really looks to be stable, "every other", but sometimes - as you can see in the videos I showed at the end of my STNICCC talk - it depends on chip temperatures, memory addresses being displayed (!) etc. I fully believe this is the ST equivalent of something like the C64 VSP issues.

We know about (GLUE) wakestates thanks to Ijor and Paulo, and the fact that we can detect different line lengths when manipulating the GLUE. Detecting what the Shifter does is however something completely different. GLUE outputs signals to other chips, Shifter outputs ... data, on the RGB or Mono lines. IMHO the two hypotheses for why "every other .. " happens are:

1) The Shifter fails copying the IR registers to RR
2) The Shifter fails reading memory data into IR registers

When thinking about this I've had in mind that the equivalent for "every other .. " in Mono (yes it exists) is that every _fifth_ word is black.

It's been my hope that #2 would be detectable, by "snooping the bus", to see if it contains image data or not. "Snooping the bus" can be done in various ways, and I've been able to do it on ST (no matter the amount of memory) and STE (unless fully RAM populated). Unfortunately, no matter which method I've used all my tests have come back with the supposed image data even though black has been displayed.

So, I'm reporting the failure in the hope that someone much smarter than me can come with additional insights ;) Maybe it's possible to detect in software, maybe it isn't. Being able to detect when it happens would open up the door to more advanced sync tricks.

The following is a link to a video with a run of the test program I've used. It fills the screen with a bitmap consisting of all 1s (with color white) and then forces the banded state by opening the left border, going to medium res for a certain amount of cycles and then back to low. At the end of the scanline is a regular right border with a Level 16 stabilizer. Everything the program does fits on one scanline - nothing is done at all for the rest of the screen. The ST is in wakestate 2, and was warm when I shot the video.

Total mayhem ;) As you can see, there's a pattern to the madness though. Which I find quite fascinating.

https://www.dropbox.com/s/b87xsoh9hgwm6 ... s.mp4?dl=0

/Troed

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1023
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: horizontal scrolling on ST

Postby TheNameOfTheGame » Fri Feb 12, 2016 7:45 pm

AtariZoll wrote:Am I only one who thinks that this thread went in wrong direction. We are at some wake up states, cycles. overscan and similar.
All it may be interesting for some demo, but for real SW horizontal scroll is something else.
Example: Enchanted Land is considered as game with very good scroll on ST, but that's total wrong. Only init animation is with good scroll, while gameplay scroll is poor, and we have many better examples. For instance Potsworth and Co.
What I would like here is talk about SW techniques used in it and some other games - like Prophecy, Stario Land ...
So, no STE HW scroll, no blitter, just 68000 code.
I working currently on improving Uridium - with better scroll, and more important faster ship turn and acceleration. it has some interesting solutions for scroll - and is from 1986 . Will first make blitter scroll version, but real thing would be fine (1px) scroll on ST without blitter.
Maybe to start special thread for it ?


Wow I love the scrolling in Potsworth. Never knew about that game before so thanks.

Question: If it is using 4-bit sync scrolling, does that means all WUS can be deterministically dealt with? Or is it using 4-bit non-sync scrolling?

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2759
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: horizontal scrolling on ST

Postby AtariZoll » Sun Feb 14, 2016 8:25 am

TheNameOfTheGame wrote:Wow I love the scrolling in Potsworth. Never knew about that game before so thanks.
Question: If it is using 4-bit sync scrolling, does that means all WUS can be deterministically dealt with? Or is it using 4-bit non-sync scrolling?

There are bigger gamers than me, who pulled out this later ST game from dust :D And I liked it.
No 4-bit sync scrolling. Game has relative big levels, so BMP of it would not fit in RAM. There is clean way, without tricks to achieve good scrolling, and not only horizontal, but vertical too. Calimero described it briefly. Code practically draws background at every scroll from "scratch" - all objects and walls, etc. Called tiles usually. There is not so much of it on 1 level (walls consist of repeating bmps), so you can hold all it in RAM in 4 preshift phases + map description data, what says what tile to draw on which pos. With good code - what is longer for speed it works pretty fast, so may get 25 fps with scroll of 60-70% of screen.
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

User avatar
calimero
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2034
Joined: Thu Sep 15, 2005 10:01 am
Location: STara Pazova, Serbia
Contact:

Re: horizontal scrolling on ST

Postby calimero » Mon Feb 29, 2016 11:37 am

Here is another game with nice scroll: Pegasus

https://www.youtube.com/watch?v=w7z0qB5P1OU
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
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: horizontal scrolling on ST

Postby troed » Thu Mar 17, 2016 1:36 am

Since some of the technical discussions on GLUE/Shifter manipulation aren't of the horizontal scrolling kind I've started a new thread dedicated to such topics instead: viewtopic.php?f=16&t=29578

(Please help me in moving over the "every-other-16-pixles-blank" topic there as well - no replies since I posted about it above. It's, iMHO, the current cutting edge of research and I'd love to hear the opinions of others on it)

/Troed

EvilFranky
Atari Super Hero
Atari Super Hero
Posts: 843
Joined: Thu Sep 11, 2003 10:49 pm
Location: UK
Contact:

Re: horizontal scrolling on ST

Postby EvilFranky » Fri Mar 18, 2016 7:10 am

Just come across another game that could have been better scrolling wise. Midnight Resistance, it scrolls like Giana Sisters, player moves to the edge of the screen and it shifts the whole screen to reveal the next area. Horrible. Good game otherwise.

User avatar
larsbrinkhoff
Atariator
Atariator
Posts: 25
Joined: Fri Mar 18, 2016 3:03 pm
Contact:

Re: horizontal scrolling on ST

Postby larsbrinkhoff » Wed Mar 30, 2016 9:17 am

troed wrote:Thanks to NoCrew's 4 pixels raster-trick (ADD/MOVE*) it's indeed possible in special cases to switch back'n'forth in four cycles.


I must put an end to this rumour that NoCrew ever did something useful. The technique was discovered by TOS-Crew.

User avatar
troed
Atari God
Atari God
Posts: 1182
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: horizontal scrolling on ST

Postby troed » Wed Mar 30, 2016 9:21 am

larsbrinkhoff wrote:
troed wrote:Thanks to NoCrew's 4 pixels raster-trick (ADD/MOVE*) it's indeed possible in special cases to switch back'n'forth in four cycles.


I must put an end to this rumour that NoCrew ever did something useful. The technique was discovered by TOS-Crew.


Oh I have fond memories of a NoCrew party ... ;) But thanks for the correction, will update my writings from now on.

(And I regularly use it while sync-trick-probing. addq.b #2 and clr.b respectively followed by a move)

/Troed

User avatar
AtariCrypt
Captain Atari
Captain Atari
Posts: 354
Joined: Fri Mar 14, 2014 5:04 pm
Location: Lancashire, England
Contact:

Re: horizontal scrolling on ST

Postby AtariCrypt » Sat Oct 01, 2016 12:03 pm

AtariZoll wrote:I working currently on improving Uridium - with better scroll, and more important faster ship turn and acceleration. it has some interesting solutions for scroll - and is from 1986 . Will first make blitter scroll version, but real thing would be fine (1px) scroll on ST without blitter.
Maybe to start special thread for it ?


How's Uridium coming along mate?
AtariCrypt ... ST/e gaming https://ataricrypt.blogspot.com

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2759
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: horizontal scrolling on ST

Postby AtariZoll » Sat Oct 01, 2016 4:11 pm

Not much time last months. Hopefully will be better in colder days.
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

User avatar
AtariCrypt
Captain Atari
Captain Atari
Posts: 354
Joined: Fri Mar 14, 2014 5:04 pm
Location: Lancashire, England
Contact:

Re: horizontal scrolling on ST

Postby AtariCrypt » Sat Oct 01, 2016 6:49 pm

AtariZoll wrote:Not much time last months. Hopefully will be better in colder days.


Willing you on mate. Beta tester awaits also.... ;-)
Steve
AtariCrypt ... ST/e gaming https://ataricrypt.blogspot.com


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 3 guests