Jump to content
Mr Robot

PAL blurring and artifacts

Recommended Posts

We hear a lot about the Atari and its NTSC artifact being used by programmers to get more colours in hi-res modes but I don't think I've ever seen (and couldn't find when I searched) any discussion of PAL games that took advantage of the way PAL displays horizontally blur the display allowing for dithering effects to increase the palette and achieve transparency effects or half bright colours the way it was done on machines like the mega drive and spectrum.

 

Are there any PAL games on the Atari that use these techniques?

Share this post


Link to post
Share on other sites

Can you mention the specific games so that we can check out what effect they are using...

 

Harvey

Share this post


Link to post
Share on other sites

Hmmm, do you mean a) PAL blending or b) PAL artifacting or c) something completely different ?!?

 

a) PAL blending: mostly used in Gr. 9+11 (256 colour) pictures, but also found in some Gr. 15 modes (shades of red, green, blue and black allow for up to 16 colours in Gr. 15 res.) and maybe other gfx modes...; there is also a topic here at AA about PAL blending...

 

b) PAL artifacting programs on the A8:

- Artifacting Character Editor by Joel Goodwin (Page 6, issue 52, pages 18-21)
- Runaround by Joel Goodwin (Page 6, issue 53 ?)

- PCS pinball "Das U-Boot": http://atariage.com/forums/topic/215962-pal-artifacting-in-altirra/?do=findComment&comment=2817669

 

c) a strange effect in a Backgammon game written in Basic (not sure if artifacting, blending or some other effect or maybe a defective crt tv display) shows the colours blue, orange and pink, but a closer look reveals that there are variances of these three colours (on the upper AND lower half of the playing field, some colours appear more bright, some appear more pale; click on the picture for a higher resolution - on the bright blue colour the "shadow" appears in dark blue, on the pale blue colour the "shadow" appears in green; the bright pink colour has a violet "shadow" the pale pink colour has a red "shadow", etc.)

 

post-3782-0-97157900-1527031985_thumb.jpg

 

In another topic Anthony Ball said, that he played around with PAL artifacting and could get 20+ colours... and of course there are several topics here at AA about NTSC artifacting and even a few topics about PAL artifacting...

Edited by CharlieChaplin

Share this post


Link to post
Share on other sites

I think he means simply color dithering .. using 2 different colors on the same line. The chroma will merge quite well actually.

 

And I must say I didn't see much of it used. But I don't know Atari software that much.

 

I use red-blue dithering to get very nice violet in my current WIP (still undisclosed, but will go public soon). On some TVs you can't tell it's not extra color.

Share this post


Link to post
Share on other sites

I meant both blurring and artifacting really. We hear a lot about NTSC artifacts here and we all know a few titles that take advantage of it (PCS, Ultima etc.) but there doesn't seem to be much talk of the clever ways programmers took advantage of the PAL system to push it beyond what it was designed to do like they did with NTSC.

 

I always remember loving PCS and all its black and white striped glory back in the day and being blown away by how it looked to Americans. Are there any titles like that but the other way around? Looks 'meh' in NTSC but 'wow' in PAL?

Share this post


Link to post
Share on other sites

@Mr Robot: please try to run Runaround II by Joel Goodwin in emulator - there should be 3 additional colours when you set PAL artifacting on.

 

Wow, really nice ! Not that I have any use for it, but it sure look great ! Can't wait to test it on real HW.

Share this post


Link to post
Share on other sites

Wait, there are more colours than those three... Altirra emulation of PAL artifacts in Runaround II looks like this:

post-33794-0-55187800-1527095826.png

Edited by +Adam+
  • Like 2

Share this post


Link to post
Share on other sites

This is exactly the kind of thing I was looking for. Do we know how many titles took advantage of these PAL peculiarities? It's disappointing to see that the Atari800 emulator doesn't display them at all, it's nice to see that Altirra does.

Share this post


Link to post
Share on other sites

Tested it on real hardware and CRT, and the colors are way more vivid compared to Altirra. It looks great !

Also made quick test project to play with it, so far I just reproduced the effect:

 

 

Artifact.xex

  • Like 3

Share this post


Link to post
Share on other sites

Love it, never remember seeing PAL artifacting, Runaround II looks great...

 

Excellent thread M.R.

  • Like 1

Share this post


Link to post
Share on other sites

Tested it on real hardware and CRT, and the colors are way more vivid compared to Altirra. It looks great !

Also made quick test project to play with it, so far I just reproduced the effect:

 

 

 

 

I'm going to raise an issue on the Atari800 github page using this app, thanks!

Share this post


Link to post
Share on other sites

Love it, never remember seeing PAL artifacting, Runaround II looks great...

 

Excellent thread M.R.

 

 

I was reading the wikipedia entry for composite artifact colours and noticed it said that PAL did it too. I remember the halfbright shading the megadrive used to use for shadows and transparency and it got used on the amiga a lot. I don't recall ever seeing it on the A8. The wiki page mentions the Spectrum which led me to this pic. (It looks a lot better if you zoom out or squint!)

 

post-62759-0-35790400-1527181113.png

 

and then off to this page...

 

https://zxart.ee/eng/graphics/top-rated/

 

I HAD to know if the Atari had taken advantage of this sort of thing, I couldn't believe the talented people of the Atari scene hadn't used the same sorts of techniques.

Edited by Mr Robot
  • Like 2

Share this post


Link to post
Share on other sites

maybe but to a display it may do the needed artifacting as well?

 

Love to know what else is PAL tweaked for this idea..

Share this post


Link to post
Share on other sites

But that ZX Spectrum picture shows dithering (Bayer algorithm I suppose), not artifacting...

 

Yes, it's a pretty common ordered dither pattern but on a pal composite display, because of the pal displays horizontal blurring the colours blend together and create new ones

Share this post


Link to post
Share on other sites

 

Yes, it's a pretty common ordered dither pattern but on a pal composite display, because of the pal displays horizontal blurring the colours blend together and create new ones

 

Well PAL blends the colors better, but they will blend as eye can't tell the individual pixels anyway. The same technique is used on VGA and higher, where no artifacting or line blending happens. That's simply dithering. Also we typically don't call PAL line mixing as artifacting.

 

We were experimenting with this on our today's local Atari meeting. We tried big LCD TV and two CRTs, and 3 different Ataris. We got 2 different phase cases (color layouts, what you have to choose in the beginning of the game). And it seemed to be computer dependent, not TV dependent. No idea what causes it. Most likely the TV is synchronized to different line, so what's even line in one case is odd line in another case ? Not sure.

 

Still the colors are pretty bright, even the modern LCD !

 

We also had vivid discussion on how it actually works. And we came to no conclusion. It's clear the pattern repeats after 8 pixels. Even if you do simple checkerboard pattern, you can see red & green stripes 4 pixels wide.

It's clear the individual lines have to be different, because of inverted PAL chroma phase. If you use same lines, the effect cancel each other. Theoretically.

But then there are patterns where this is not true (blue & yellow). Why ?

I think the general principle is it's simply interpolation of 2/5 chroma sub-carrier by the luma signal (pixels). But I couldn't come with any clear formula, especially why it does repeat after 8 pixels ? Makes no sense.

 

Phareon you here ? You know, right ? Right ?

  • Like 2

Share this post


Link to post
Share on other sites

Artifacting occurs due to the way that color is encoded in a video signal for NTSC and PAL composite video. As with NTSC, it is different than dithering and has nothing to do with the display technology -- it is aliasing in the signal. CRT/LCD element pattern doesn't matter here at all. Also, unlike dithering, you can't just use a high frequency pattern, you also have to aim for specific phases to get specific colors.

 

Composite video encodes color as a quadrature-encoded signal merged in with the luminance -- basically a sine wave. The strength of that sine wave determines the saturation and the phase determines the hue. It is important to realize that the display cannot tell the difference between a color signal and a sine wave in the luma of the same frequency -- they alias with each other and are inseparable. Signal theory says that if you have a square wave or squarish wave at a given frequency, it can be separated into a sine wave of that frequency and multiples of that frequency (harmonics). This is how you get color out of a pixel pattern of the right frequency.

 

There are a couple of issues specific to the Atari, or older computers more generally, that add to this. The luma signal can be prefiltered to remove frequencies that would alias against the color signal -- the Atari doesn't do this. You'll also see some references in literature to the color signal interleaving with the luma signal in the frequency spectrum like a comb so they don't actually overlap. This would be the case if the Atari produced an interlaced signal -- which again, it doesn't do. The color signal would normally flip back and forth in pattern (phase) to cancel itself out, i.e. the luma pattern would have to be 101010... one frame and 010101... the next. In a broadcast signal, this looks like the checkerboard slowly moving upward, and the alternating checkerboard tends to cancel just by persistence alone. But with the computer's video output, the pattern is steady. That makes it easier to artifact and harder for the display to separate out the color.

 

For NTSC, the color frequency (chroma subcarrier) comes out to one lores or two hires pixels per chroma cycle (3.58MHz), so an alternating on-off pattern gives you color. For PAL, the chroma subcarrier is at a higher frequency (4.43MHz) and advances by 5/4 cycles per lores pixel or 5/8 for hires pixel, thus the pattern width of 4 or 8. In both cases the colors produced can differ between computers because the relative phase between luma and chroma varies.

 

Finally, PAL does change chroma phase on alternating lines, thus the name and the need for the herringbone pattern. However, the phase doesn't flip 180d, it reverses direction. To be more precise, the reference swings back and forth by 90 degrees and the V/Cr (chroma red) axis negates. Blue and yellow are solely along the U/Cb (chroma blue) axis, so they are not affected by the reversal.

 

Altirra does emulate all of this in PAL high artifacting mode, but it hasn't been tuned as much as the NTSC high artifacting. Right now it has the chroma subcarrier too strong, so the luma is too strong and the artifacted colors are too weak. Retuning this stuff is kind of a pain though as it usually requires the luma/chroma IIR separation filters to be retuned too.

  • Like 5

Share this post


Link to post
Share on other sites

Well if you get a chance later on Avery... It would be nice to see it get improved now that its more out in the public as a PAL thing but if the work is way over the top then don't worry, we can see it now, the tweaks my not really help much to the naked eye??

 

All I did was tun the colour saturation up to make it more obvious....Was enough for me.....What actually would it do if it was tweaked?

Edited by Mclaneinc

Share this post


Link to post
Share on other sites

Thansk Phareon, nice explanation. We were basically right, we just didn't have the right numbers. And I didn't realize that yellow and blue are 0 and 180. I kept thinking in Atari colors .. 0 phase must be white. Which is nonsense. Zero amplitude is white. All makes sense now.

 

And great job on Altirra. The only difference compared with real HW is the colors a bit weaker, and checkerboard pattern doesn't do anything. On real HW it shows red and green stripes 4 pixels wide. But it's really minor issue, I wouldn't bother with it.

Share this post


Link to post
Share on other sites

So .. with this new wisdom I gained, here is new demonstration. I'm trying to generate all hues possible. In the process I realized I have a parameter for pattern 'density', and it almost works like luma. So in the demo you can see hue changing from top to bottom, and this 'luma' changing from left to right.

You can see that patterns around 50% of density have best resolution in hue. As the patterns get too sparse or too dense, they can't encode phase well.

Basically you have yellow, blue, red and green .. and the rest is mix of these.

 

How do I compute it ? First the convention. I use interval 0..2 for all phases, i simply discarded Pi from all the equations, I don't need it.

For each pixel I compute current luma phase, which is simply 0 for even pixels and 1 for odd pixels.

 

Then I also for each pixel compute expected chroma phase, based on X*5/4. Its a bit 'slower' then luma phase.

Then on even lines desired hue is added, and on odd lines hue is subtracted from it and 0.5 is added - this gives me correct desired hue phase.

 

Then I do the delta of these phases, and normalize the delta to lie from -1 to 1. For constant hue the value would change from -1 to 1 repeatedly across the screen.

 

Then I only draw the pixel if the phases don't differ too much. If the delta is lower then my desired pixel density, let's say 0.5, I draw the pixel, otherwise I leave it black. In this image the density used goes from 0 to 0.6, more than that gives mostly white area.

 

I will try to do some image converter. The pixel density is not really luma, it's more like ATARI palette, and I have no control over saturation, but who knows, maybe I can do something interesting with it.

Artifact2.xex

  • Like 8

Share this post


Link to post
Share on other sites

So here is the "Artifact Character Editor" by Joel Goodwin (Page 6, issue 52)... it is on diskside A under the name Artifact.BAS...

 

Now, I also found a PCS pinball in Gr. 8 that displays colours on my PAL-only tv (and PAL A8). I can see there red, green, violet and brown. Violet is a mix of red+blue, but brown (is it a mix of red+green) ?!?

 

http://atariage.com/forums/topic/215962-pal-artifacting-in-altirra/?do=findComment&comment=2817669

 

PCS pinball for download:

http://a8.fandal.cz/detail.php?files_id=6415

 

 

Page6_issue52.zip

Edited by CharlieChaplin
  • Like 1

Share this post


Link to post
Share on other sites

There are colors, but it doesn't look like they are intentional .. if so the artistic choices are weird at least.

Share this post


Link to post
Share on other sites

So .. with this new wisdom I gained, here is new demonstration.

 

Oh man, it cries "take me to the demoscene"!

Edited by pirx
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...