Parallax Distorter 2

All about ST/STE demos

Moderators: Mug UK, lotek_style, Moderator Team

sigge
Atarian
Atarian
Posts: 9
Joined: Tue Oct 10, 2017 8:28 am

Parallax Distorter 2

Postby sigge » Wed Sep 05, 2018 11:37 am

I uploaded a little sequel to the Parallax Distorter on GitHub, and wrote about it on the Facebook group for the Atari ST Demoscene. I thought it could be useful to mention here as well.
Kind of like @leonard's byte-bending one, but this time bit-bending (per pixel y dist, combined with x-dist using STe hardware).

Source code (including some background info) and executable at:
https://github.com/sigfridsson/paradst2

paradst2 2.png
You do not have the required permissions to view the files attached to this post.

User avatar
dhedberg
Atari Super Hero
Atari Super Hero
Posts: 832
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: Parallax Distorter 2

Postby dhedberg » Wed Sep 05, 2018 11:57 am

Awesome! I've only watched it in Hatari so far, but looks fantastic! Is there more on the way perhaps? ;-)
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

Maartau
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2619
Joined: Thu Dec 15, 2005 2:15 am

Re: Parallax Distorter 2

Postby Maartau » Wed Sep 05, 2018 1:07 pm

Yeah, really really cool :cheers: :thumbs: .

evil
Captain Atari
Captain Atari
Posts: 165
Joined: Sun Nov 12, 2006 8:03 pm

Re: Parallax Distorter 2

Postby evil » Wed Sep 05, 2018 7:40 pm

Hello,

great work! Very impressive first Atari works, welcome to the world of racing the beam and counting clock cycles to death :)

I've run your demo on a real STe, and it almost works. There is a blackout in the right border approx every 32nd scanline (have not counted exactly). In the left border there's a black "bulb" as well, I guess hscroll related.

I filmed it with my crappy mobile phone so you can have a peek:
https://www.dropbox.com/s/j13mu6qe9l9u1 ... 9.mp4?dl=0


Again, solid work, great to see new Atari coders from Sweden, it wasn't exactly yesterday :-)

User avatar
dhedberg
Atari Super Hero
Atari Super Hero
Posts: 832
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: Parallax Distorter 2

Postby dhedberg » Wed Sep 05, 2018 7:47 pm

Yeah, I was thinking the same Evil! Who are you Sigge? Been involved in the demo scene before? You've certainly proved that you've got talent!
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

User avatar
viking272
Captain Atari
Captain Atari
Posts: 368
Joined: Mon Oct 13, 2008 12:50 pm
Location: west of London, UK

Re: Parallax Distorter 2

Postby viking272 » Wed Sep 05, 2018 8:29 pm

Nice work!
Author details are here ... https://github.com/sigfridsson/paradst2 ... /README.md
So nothing released on Atari before?!?

User avatar
dhedberg
Atari Super Hero
Atari Super Hero
Posts: 832
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: Parallax Distorter 2

Postby dhedberg » Wed Sep 05, 2018 10:28 pm

Well, once you pop you can't stop! :lol:
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

sigge
Atarian
Atarian
Posts: 9
Joined: Tue Oct 10, 2017 8:28 am

Re: Parallax Distorter 2

Postby sigge » Thu Sep 06, 2018 1:41 pm

Hehe, thanks for the encouraging words!
I was coding the ST around 92-94 I guess. I made some intros/demos that I sent to my friend (Headcase), but I never released them. Around 94 or so, I started to code on PC instead. Me and Headcase called ourselves Corrosion, but we had no graphic artists nor musicians. At Remedy 1995, we teamed up with Drool and released "Catch Willy (and make him do tricks)". It had a nice bump mapping object I was quite proud of, but we lost the compo anyway. Drool and Corrosion merged into Gash, and we released the first (and only) issue of a PC diskmag called Caustic Verses. Later on Gash partially merged into Sunshine Productions PC division. One could say that I coded quite a bit back then, but regrettably, I never released the stuff...

Picking up the 68k assembler again was TONS of fun. I'm amazed how well Hatari emulates it all. I was not expecting it to run that well on real hardware. Apparently there are still some glitches.

Thanks, @evil, for the video. I hope I can make some sense of it. Daniel Törnquist reported similar issues on the Facebook thread, but that was with a Mega STE, but it shows some strange effects at the top as well.
I do see in your video that the video counter is not what it is supposed to be. Looks like offset by 240 bytes or so, which makes the buffer end at the last line (20) to the right. I use only hskip on each line, so the offset must start from top and carry on down. I just have to find out why. Thanks for testing!

User avatar
lotek_style
Mod(ul)erator
Mod(ul)erator
Posts: 2402
Joined: Sat May 11, 2002 2:39 pm
Location: germany
Contact:

Re: Parallax Distorter 2

Postby lotek_style » Thu Sep 06, 2018 2:05 pm

Any chance that we can recover the old unreleased intros?
lotek style / the sirius cybernetics corporation
- musician - ascii-artist - swapper - archivist -

.tSCc. - low-tech atari cyberpunks since 1990
http://www.tscc.de/ | http://demozoo.org/ | http://www.lotekstyle.de/ | http://ymrockerz.atari.org/

sigge
Atarian
Atarian
Posts: 9
Joined: Tue Oct 10, 2017 8:28 am

Re: Parallax Distorter 2

Postby sigge » Thu Sep 06, 2018 2:50 pm

@evil, I found a potential reason why it could be different on real hardware, with respect to my setting of the hskip value on the first line. Could you try the updated version?

@lotek_style, I hope I can retreive them, but I don't know how yet. I have the floppies, but no floppy reader solution (USB floppy drives don't work). I also have my hard drive, but I need to find a computer with a proper SCSI interface and hopefully some software to clone (and potentially read) it.
I'm also sad that I don't know where my old PC stuff is any longer.

User avatar
lotek_style
Mod(ul)erator
Mod(ul)erator
Posts: 2402
Joined: Sat May 11, 2002 2:39 pm
Location: germany
Contact:

Re: Parallax Distorter 2

Postby lotek_style » Thu Sep 06, 2018 3:44 pm

sigge: If I am correct you are this guy? https://demozoo.org/sceners/32507/

I suggest to contact erOs if you are in Poland... he might be able to image the stuff :)
lotek style / the sirius cybernetics corporation
- musician - ascii-artist - swapper - archivist -

.tSCc. - low-tech atari cyberpunks since 1990
http://www.tscc.de/ | http://demozoo.org/ | http://www.lotekstyle.de/ | http://ymrockerz.atari.org/

evil
Captain Atari
Captain Atari
Posts: 165
Joined: Sun Nov 12, 2006 8:03 pm

Re: Parallax Distorter 2

Postby evil » Thu Sep 06, 2018 4:06 pm

sigge wrote:@evil, I found a potential reason why it could be different on real hardware, with respect to my setting of the hskip value on the first line. Could you try the updated version?


Hi,

I've tested the updated version, and the "left side buldge" is fixed.
But the right-side "scanline ending too early every 32nd line" is still the same.

It shows the font colours for 20-30 pixels then going black.

A little tip, if you have problems with hskip (modulo) register not being able to do wide enough screen, there's a way around by setting screen pointer each scanline, if you have the free CPU-time. That will offer you unlimited linewidth and it's in my opinion easier to get a grasp over than the modulo :-)

evil
Captain Atari
Captain Atari
Posts: 165
Joined: Sun Nov 12, 2006 8:03 pm

Re: Parallax Distorter 2

Postby evil » Thu Sep 06, 2018 4:18 pm

lotek_style wrote:sigge: If I am correct you are this guy? https://demozoo.org/sceners/32507/

I suggest to contact erOs if you are in Poland... he might be able to image the stuff :)


No, this is the one: https://demozoo.org/sceners/14785/

User avatar
lotek_style
Mod(ul)erator
Mod(ul)erator
Posts: 2402
Joined: Sat May 11, 2002 2:39 pm
Location: germany
Contact:

Re: Parallax Distorter 2

Postby lotek_style » Thu Sep 06, 2018 4:31 pm

Ok Sweden then... I guess you (evil) or Marcer could help then? :)
lotek style / the sirius cybernetics corporation
- musician - ascii-artist - swapper - archivist -

.tSCc. - low-tech atari cyberpunks since 1990
http://www.tscc.de/ | http://demozoo.org/ | http://www.lotekstyle.de/ | http://ymrockerz.atari.org/

User avatar
lotek_style
Mod(ul)erator
Mod(ul)erator
Posts: 2402
Joined: Sat May 11, 2002 2:39 pm
Location: germany
Contact:

Re: Parallax Distorter 2

Postby lotek_style » Thu Sep 06, 2018 4:45 pm

lotek style / the sirius cybernetics corporation
- musician - ascii-artist - swapper - archivist -

.tSCc. - low-tech atari cyberpunks since 1990
http://www.tscc.de/ | http://demozoo.org/ | http://www.lotekstyle.de/ | http://ymrockerz.atari.org/

sigge
Atarian
Atarian
Posts: 9
Joined: Tue Oct 10, 2017 8:28 am

Re: Parallax Distorter 2

Postby sigge » Thu Sep 06, 2018 8:29 pm

Thanks so much for testing!
I have an idea (though I’m a bit surprised I coded it this way, and even more surprised that the emulators didn’t catch this).

I’d love any help in Stockholm, especially with the floppies. To dig out the sources, i need the hard drives. I have a potential opening at work, but any help is appreciated.

User avatar
npomarede
Atari God
Atari God
Posts: 1260
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Parallax Distorter 2

Postby npomarede » Thu Sep 06, 2018 8:39 pm

sigge wrote:Thanks so much for testing!
I have an idea (though I’m a bit surprised I coded it this way, and even more surprised that the emulators didn’t catch this).

Hi
if you find the difference when demos runs OK under Hatari but not on real STE and you have a fix for that, I would be interested to know what you changed as it might give an example of something not correctly emulated yet (or maybe it's already on my TODO of things to improve in STE video emulation)

Nicolas

User avatar
alien
Atari maniac
Atari maniac
Posts: 95
Joined: Sat May 01, 2004 4:01 am
Location: USA
Contact:

Re: Parallax Distorter 2

Postby alien » Fri Sep 07, 2018 4:14 am

Congratulations on your demo sigge! Very impressive first release.

Funny you mention no graphics artists, Ajrarn & I were in a group "the Technocrats" but never released anything for the same reason. Then we joined up with ST Connexion and Krazy Rex & ATM gave us bitmaps to make our code sparkle :D !

And it's very nice to see a demo that visually demonstrates the STe's improvements over the ST. It's only recently that demos have started coming out showing these strengths.
Alien / ST-Connexion

evil
Captain Atari
Captain Atari
Posts: 165
Joined: Sun Nov 12, 2006 8:03 pm

Re: Parallax Distorter 2

Postby evil » Sat Sep 08, 2018 10:09 am

sigge wrote:Thanks so much for testing!
I have an idea (though I’m a bit surprised I coded it this way, and even more surprised that the emulators didn’t catch this).

I’d love any help in Stockholm, especially with the floppies. To dig out the sources, i need the hard drives. I have a potential opening at work, but any help is appreciated.


If all fails finding someone in Stockholm I can help you out.
I'm in Dalarna so you'd need to ship the disks in that case though.

sigge
Atarian
Atarian
Posts: 9
Joined: Tue Oct 10, 2017 8:28 am

Re: Parallax Distorter 2

Postby sigge » Mon Sep 10, 2018 1:04 pm

evil wrote:I've tested the updated version, and the "left side buldge" is fixed.
But the right-side "scanline ending too early every 32nd line" is still the same.

It shows the font colours for 20-30 pixels then going black.

A little tip, if you have problems with hskip (modulo) register not being able to do wide enough screen, there's a way around by setting screen pointer each scanline, if you have the free CPU-time. That will offer you unlimited linewidth and it's in my opinion easier to get a grasp over than the modulo :-)


I noticed I did something stupid. :roll:
Every 20 lines, I "reset" the screen address to the top of the 20 line buffer. All my lines are 256 bytes long (which makes it enough to use hskip/modulo which saves me a few cycles), and so I only touch the screen middle byte address ($ffff8207). The stupid part was that I put that code right before opening the right border, i.e. when the display was active!. This resulted in the black line. In your video one can even see that the shifter starts fetching the new data (zeroes) something like after three bit planes have been fetched.

I modified the way it worked a bit, and now I hope it has a better chance on your machine! Would you please try it again?


npomarede wrote:
sigge wrote:Thanks so much for testing!
I have an idea (though I’m a bit surprised I coded it this way, and even more surprised that the emulators didn’t catch this).

Hi
if you find the difference when demos runs OK under Hatari but not on real STE and you have a fix for that, I would be interested to know what you changed as it might give an example of something not correctly emulated yet (or maybe it's already on my TODO of things to improve in STE video emulation)


Well, the first issue that was fixed before, was that i modified hskip/modulo on the first line (syncline), where I do not open the right border (my mistake). Since the value is latched only when the display is active (as I read in your source code, thank you!), I think I was in a bit of a grey zone here. It could be very close to where the shifter/GLUE/MMU stops fetching data. It appeared as though hatari did not use the value, but Evil's STE did (or possibly the other way around). The revision d151c14 GitHub fixed this.

The other issue is the one above, where the modification to $ffff8207 didn't seem to be reflected during the line in Hatari. This I still have not verified, though. (I should be more careful before stating things like this...)
Ooh, and I only tried in the 2.1.0 release - didn't try the nightlies yet. Maybe you fixed this long ago.

None of these two use-cases would probably show up in real software, though. Both of them were errors on my behalf. My latest version on GitHub fixed these issues (in Hatari, at least).

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

Re: Parallax Distorter 2

Postby TheNameOfTheGame » Mon Sep 10, 2018 2:22 pm

Your latest fix has eliminated the repeating black lines on the right hand of the screen using Steem 3.8.

Awesome demo!

evil
Captain Atari
Captain Atari
Posts: 165
Joined: Sun Nov 12, 2006 8:03 pm

Re: Parallax Distorter 2

Postby evil » Mon Sep 10, 2018 3:33 pm

sigge wrote:I modified the way it worked a bit, and now I hope it has a better chance on your machine! Would you please try it again?


I can confirm it works like intended on my STe now, well done :-)

User avatar
npomarede
Atari God
Atari God
Posts: 1260
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Parallax Distorter 2

Postby npomarede » Tue Sep 11, 2018 7:46 pm

sigge wrote:Well, the first issue that was fixed before, was that i modified hskip/modulo on the first line (syncline), where I do not open the right border (my mistake). Since the value is latched only when the display is active (as I read in your source code, thank you!), I think I was in a bit of a grey zone here. It could be very close to where the shifter/GLUE/MMU stops fetching data. It appeared as though hatari did not use the value, but Evil's STE did (or possibly the other way around). The revision d151c14 GitHub fixed this.

The other issue is the one above, where the modification to $ffff8207 didn't seem to be reflected during the line in Hatari. This I still have not verified, though. (I should be more careful before stating things like this...)
Ooh, and I only tried in the 2.1.0 release - didn't try the nightlies yet. Maybe you fixed this long ago.

None of these two use-cases would probably show up in real software, though. Both of them were errors on my behalf. My latest version on GitHub fixed these issues (in Hatari, at least).

Hi

thanks for the details ; in both cases, I think the problems you had are related to the same things : changing some video registers (eg video address) during active display.
Hatari tries to limit this issue, but so far the rendering method is not accurate enough to handle all the cases where ff8207 is changed. Even on real STe, changing video address during active display can give some artifacts if the change is not in sync with the MMU reading video memory.
Anyway, nice demo you wrote (in fact writing a similar x-y dist screen was on my todo list, so I will have to do something else now :) )

Nicolas

sigge
Atarian
Atarian
Posts: 9
Joined: Tue Oct 10, 2017 8:28 am

Re: Parallax Distorter 2

Postby sigge » Wed Sep 12, 2018 12:15 pm

Great!
This was so much fun. I'm very thankful for the encouraging comments. I'm also happy to hear it works on real hardware. It is amazing how well it worked to develop in an emulated environment.

Now I'm thinking of what to do with all the NOPs left. ;-P
I would love to put the blitter to use, but it seems it will be too limited by the memory bandwidth (reading and writing the same locations many times when OR-ing in four 4-bit values, for example).

Perhaps I'll try to make a 512k version with realtime decompressed sound. Preliminary tests indicate decent sound quality at 2x compression ratio, but I'll have to play around to find a good delta coding table, and of course implement the decoding in the fullscreen code.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1811
Joined: Sun Jul 31, 2011 1:11 pm

Re: Parallax Distorter 2

Postby Eero Tamminen » Wed Sep 19, 2018 9:03 pm

lotek_style wrote:Archived :) https://demozoo.org/productions/192768/


That page says it's ST/E, but it seems to work only on STE (and is indeed pretty nice).


Social Media

     

Return to “Demos - General”

Who is online

Users browsing this forum: No registered users and 2 guests