-Closure- tricks

All about ST/STE demos

Moderators: Mug UK, lotek_style, Moderator Team

Post Reply
User avatar
big alec
Atarian
Atarian
Posts: 8
Joined: Tue Jun 12, 2007 1:42 am
Location: San Jose, CA
Contact:

-Closure- tricks

Post by big alec »

Ok, I meant to ask this several weeks ago, after finally seeing a video cap of SYNC's brilliant -Closure- demo, and I'm seriously surprised that nobody has asked this before, since I don't think it is obvious by any means:

How the hex do they do a fullscreen x-dister on a regular ST? It should be impossible, so it's sensible to suspect a trick. One idea that came to my mind was that there is no actual bitmap distortion going on, but instead the effect is based on color palette modifications using 12 cycle move instructions. One clue to that is that is the observation that all the disting fullscreen graphics are zoomed, i.e. really big, with about 41 "pixels" per scan line.

But then the question arises: How can the timing of the color changes be delayed with 1 pixel precision (at least that's what it looks like from inspecting a frame from the youtube capture)? Is there some new Shifter/GLUE trick that can distorts video timing in a way that the location of a palette switch is shifted? Is it related to Alien/ST-Cnx' 4-bit hardscroll trick?

Either way, my hat is off to you, Troed! Congratulations from an amazed old school scener. Achievement unlocked! :)

Gunnar
(Big Alec/ Delta Force)
The Union rulez!
User avatar
npomarede
Atari God
Atari God
Posts: 1346
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: -Closure- tricks

Post by npomarede »

Hi
as you suspect, the 1 pixel precision is obtained by having some kind of bitmap mask. So, you can get 4 pixels precision with the usual NOP as in most color plasma, but then you add an additional layer of bitmap, so instead of having only color 0 only as the background, you have a background made with stripes of different colors.
The tricky part is then to change each color 0-15 at the correct position to get the amazing visual result.

For a slightly smaller demo using a similar effect, you can have a look at the dragonnels demo menu (but this was also used in several demos too, in one of the No Cooper plasma for example). Closure certainly gives the best result using this technique :)



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

Re: -Closure- tricks

Post by troed »

(Emulator writers should be disqualified from spilling the beans ;))
It should be impossible, so it's sensible to suspect a trick
Thanks Big Alec! It was our goal to leave people confused at STNICCC, the old school way :D Unfortunately whether people were confounded or not largely depended on how recent their own involvement in the scene was :) I remember giving Omega and Electra a preview in our room and that only resulted in a long discussion having to juggle memories on how much four bpl bitmap data you really could movem in a VBL.

As to your 12 cycle hypothesis - you're correct in that 41 (or maybe 42, depends on wakestate) virtual pixels are visible per line. So they cannot be 12 pixels wide. Also, in the fullscreen XY dist screen there would be no time to do a per-column lookup for the Y-dist.

Closure does however use the very latest sync-trick knowledge to be able to fit all the code needed into the fullscreens. Even with trickery :P

/Troed
sigge
Retro freak
Retro freak
Posts: 10
Joined: Tue Oct 10, 2017 8:28 am

Re: -Closure- tricks

Post by sigge »

Well, I'm not an emulator writer, and I think you mentioned it before somewhere else;
I looked at the border code, and it seems that you exploit that there are no 'switches', but rather being at the desired 50/60/70 at appropriate positions that counts. Instead of HI/LO at the left and 60/50 at the right, you do HI/50/LO and 60, respectively. Are you in HI for four cycles longer than "usual", and is it this that frees you from needing a stabilizer? If not, why don't you need a stabilizer?

For the multiple scrollers, I haven't looked at the code, but I was speculating that you use several sync scrolling parts here. Is that correct? Kind of "folding" the screen memory to scroll the lines individually.

I was not at STNICCC, but I was still confused the old school way when I saw it. :-)
It's super fun to try to guess or figure out how you do the stuff.
User avatar
troed
Atari God
Atari God
Posts: 1460
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: -Closure- tricks

Post by troed »

Thanks!

You're correct on both accounts. I try (95% successfully) to stabilize (clear) the Shifter at the left border instead of at the right. It was 100% on all my tested STs and STEs (nine) but I have since come to understand that it isn't as successful as the Level 16 stabilizer.

The res/freq changes are different in all four ST wakestates and on STE, so what you saw there is the unusual one. For three of the ST wakestates there's a switch to MEDIUM in between HI and LO.

The multiscroller is indeed 6 sync scrolls working together. That was fun to write :D

/Troed
slingshot
Atari God
Atari God
Posts: 1843
Joined: Mon Aug 06, 2018 3:05 pm

Re: -Closure- tricks

Post by slingshot »

I wondering what Closure does to detect ST? On the MiST core, it runs only in STe mode, because it seems it mis-detects ST mode as STe. However extra registers are masked, the left DE checking point is adjusted, what else would be?
Upd.: can be the wakestate identificaton?
User avatar
npomarede
Atari God
Atari God
Posts: 1346
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: -Closure- tricks

Post by npomarede »

Hi,
Troed posted the source code for his boot sector that does wakestate + ste detection, you should have more details there.
See https://github.com/troed/WSDETECT

Nicolas
slingshot
Atari God
Atari God
Posts: 1843
Joined: Mon Aug 06, 2018 3:05 pm

Re: -Closure- tricks

Post by slingshot »

Hi,
Thanks, I'll check. And then I'll see how can I modify the STe video circuit to act more like the ST.
Post Reply

Return to “Demos - General”