Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > New video modes? 320x400 and 160x400
2007-04-10 03:44
nikoniko
Account closed

Registered: Dec 2006
Posts: 1
New video modes? 320x400 and 160x400

Hi all,
Hydrophilic/Hydradix over at the Commodore 128 Alive! forums has been working on a technique to achieve 320x400 and 160x400 interlaced modes on a C128, taking advantage of the VIC IIe's undocumented test bit to allow fine control of raster output. He's succeeded in getting it to work for NTSC (at least on his own TV), and has now put up a simple demonstration and instructions on fiddling with the settings. Anyway, with some experimentation it sounds like it could turn into something pretty cool, especially if some bright minds here could combine it with other techniques.

I know this place is mainly about 64 coding, but since the approach should also work on 128s in 64 mode, I thought you might like to know about it.

Here's his announcement: http://landover.no-ip.com/128/viewtopic.php?pid=2637

And here's his webpage, which goes into some detail about the technique: http://www.geocities.com/hydradix/C128/Interlace.htm

And finally, here's the original forum discussion while he was working on it: http://landover.no-ip.com/128/viewtopic.php?id=807

I believe he's tried to make it easy to tweak, so PAL support could probably be achieved by someone who wants to play with it.

I'd recommend that if you want to ask him questions, the forums I linked to are probably the best place since he's a frequent poster over there.

Cheers,
nikoniko
 
... 46 posts hidden. Click here to view all posts....
 
2007-05-21 20:36
MagerValp

Registered: Dec 2001
Posts: 1078
No, the VIC never scrolls 0.5 pixels per frame, the image does.

OK, imagine that the C64 had a graphics chip that actually could display interlaced graphics, say gfx bank 0 on odd fields and gfx bank 1 on even fields. You'd draw your 400 line graphics and then split it into two koalas, even lines in image A in bank 0 for display in odd fields (remember odd comes first), and odd lines in image B in bank 1 for display in even fields (with 0.5 line offset). Everything clear so far?

Now, to display this 400 line image without scrolling, the two images would be displayed like this:

frame 0 odd field: image A, 0 pixel offset
frame 0 even field: image B, 0.5 pixel offset
frame 1 odd field: image A, 0 pixel offset
frame 1 even field: image B, 0.5 pixel offset

and so on. Easy so far, and we need an interlaced display to view it. Now, if we scroll this image down at 1 pixel per frame, we get a display like this:

frame 0 odd field: image A, 0 + 0 = 0 pixel offset
frame 0 even field: image B, 1 + 0.5 = 1.5 pixel offset
frame 1 odd field: image A, 2 + 0 = 2 pixel offset
frame 1 even field: image B, 3 + 0.5 = 3.5 pixel offset

No funny stuff, and we still need interlace to display it. Now, if we scroll the image 0.5 pixels per frame, magic happens:

frame 0 odd field: image A, 0 + 0 = 0 pixel offset
frame 0 even field: image B, 0.5 + 0.5 = 1 pixel offset
frame 1 odd field: image A, 1 + 0 = 1 pixel offset
frame 1 even field: image B, 1.5 + 0.5 = 2 pixel offset

The half pixel offset from the interlace, and the half pixel scroll cancel eachother out, and give an integer result. The VIC, and LCD screens, have no problem displaying it.

2007-05-22 09:17
Oswald

Registered: Apr 2002
Posts: 5094
I dont quite understand your explanation, but found one which works for me :)

ie. displaying alternatively the odd and even lines is kinda like scrolling the picture up/down, then the rest to do is add a real scroll every 2nd frame.

however the vic still doesnt displays odd/even lines, thus the resolution does not increase, its rather like a scrolling image at 25 hz, and we only see either the odd or even field.
2007-05-22 09:23
Radiant

Registered: Sep 2004
Posts: 639
Or to summarize MagerValp's rather lengthy post: In scrolling an interlaced screen, when displaying the second frame you always need to add the interlacing shift value to the scroll position. This fact can be taken advantage of: if you want to interlace a screen by 0.5 pixels, you simply set the scroll speed to -0.5 pixels, and thus, you get sub pixel positioning without ever having to display graphics on anything but the integer pixels.

Example, assuming starting scroll position of 20:

20.0
19.5 + 0.5 pixels interlacing = 20
19.0
18.5 + 0.5 pixels interlacing = 19
18.0
17.5 + 0.5 pixels interlacing = 18

etc.
2007-05-22 09:50
Mace

Registered: May 2002
Posts: 1799
Quoting Oswald
its rather like a scrolling image at 25 hz, and we only see either the odd or even field.

True, in theory.
But our braines complete the picture.
It's like a moving object behind a fence: you can't see the entire object at any one time, as part of it will be obscured by the fence.
However, because it's moving and we alternately see different parts, our brain can add up these parts.
It's kind of like a virtual resolution.


Although almost 50% is behind the fence, we still see this as a sheep...
2007-05-22 09:57
Copyfault

Registered: Dec 2001
Posts: 478
I do have the same problems as Oswald with these explanations...

If I got it right, a true (PAL) interlace works like this: first the rasterbeam creates one type of lines of the given image (let's say ODD lines, maybe it's the other way around). Doing this the EVEN lines are ommitted. After this first halfpicture has been drawn, the next halfpicture, consisting of the EVEN lines, will be put into the even lines of the whole display, this time ommitting the ODD lines.

The C64 can only display ONE type of lines (let's say ODD ones). AFAIK there is no possibility to 'scroll' a picture into the other type of lines.

The only explanation for the 'higher resolution' which is achieved by the techniques described in this thread seems to be the working of the human brain. Scrolling the picture up by 1 pixel only every 2nd frame kinda forces our brain to 'insert' the EVEN lines of the picture (which by the hardware of the C64 definitively sit on ODD lines!) between the real ODD lines.

Now I wonder if there is a difference between true (PAL) interlace and this Pseudo-PAL-interlace-achieved-by-scrolling... maybe anyone already compared these two displaying techniques??? My guess is that our brain renders exactly the same image.

CF
2007-05-22 10:03
Radiant

Registered: Sep 2004
Posts: 639
copyfault: The point is the "half" lines are never used, because of the movement speed. The principle is exactly the same regardless of whatever interlacing method is deployed.
2007-05-22 10:20
Oswald

Registered: Apr 2002
Posts: 5094
still a real interlaced display uses the half lines, independant of the scrolling speed.
2007-05-22 12:52
Copyfault

Registered: Dec 2001
Posts: 478
Now I at least think I got the point Mager Valp&radiantx tried to make clear: the image we get when scrolling up by 1 pixel every 2nd frame is exactly the same as if it would be scrolled by 0.5 pixel every frame in real interlace. Hmm, but then, this is more like a resolution reduction for the true interlace (the halfpixel-scrolling makes one type of lines, e.g. EVEN ones, obsolete). So this seems more like a transformation true (PAL)-interlace -> Only-ODD-lines-interlace.

Still... the brain must play a central role here! Nobody here who had the chance to do a direct comparison?

CF
2007-05-22 14:15
ptoing

Registered: Sep 2005
Posts: 271
This effect has nothing to do with scanlines at all as far as I understand. It is purely optical (an illustion if you will).

I made some pictures of how I think it works.

I took my picture Yus Chunk and seperated it into it's odd and even lines (yes I know it is only 200 pixels high to begin with, but the effect still applys)




Now when condense them by taking out the blanks and animate them one after another, odd first you get this. You can see that the even frame seems to scroll even tho technically it DOES NOT. This is because due to being condensed the lines got shifted up by one, hence the fake scrolling. And this is also the reason you only need to shift the whole deal up every 2nd frame.


And because this has fuck all to do with scanlines you can also do this horizontally as well.
2007-05-22 14:47
algorithm

Registered: May 2002
Posts: 705
When applying this to still images, you can still get some type of percievement of resolution increase (although it would be classed as color interlace only)

Try the same for a two white line circles at 400 pixels.

remove odd lines from first pic. even lines from second
then remove the gaps and flick them every frame.

What do you see. Percieved resolution increase, even though it is only color interlace.
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Devil/Clique
Sulevi/Virtual Dreams
psenough
slimeysmine
kbs/Pht/Lxt
LDX#40
Knut Clausen/SHAPE/F..
csabanw
Alakran_64
Guests online: 85
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.054 sec.