Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Nicron ! (Registered 2024-05-21) 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 10:58
Style

Registered: Jun 2004
Posts: 498
actually, depending on the monitor you might be able to shift the screen vertically in a subtle way simple from what youre displaying.

We've all seen it - you have some text on a black screen, then you change the background to white and the text shifts......

Monitors are teh crap :)
2007-05-21 15:55
ptoing

Registered: Sep 2005
Posts: 271
So this only works with constantly scrolling stuff?
Would it be possible to scroll up and then flick down again and scroll back up or something to get "still" images to work. THAT would be neat.
2007-05-21 16:01
Oswald

Registered: Apr 2002
Posts: 5028
Quote: Yes, the trick is that when you're scrolling 0.5 pixels per frame. If you scroll a non-interlaced image 0.5 pixels per frame, you get line numbers like:

frame 0: 200
frame 1: 199.5
frame 2: 199
frame 3: 198.5

Which the VIC can't display, as it can't move half lines. But if you scroll an interlaced image 0.5 pixels per frame, you get:

frame 0 odd field: 200
frame 0 even field: 199.5 + 0.5 = 200
frame 1 odd field: 199
frame 1 even field: 198.5 + 0.5 = 199

With scrolling plus interlace, the even fields end up on integer line numbers, which the VIC can display. As soon as the image stops moving, the effect stops working. It also works with 1.5 pixels per frame, etc.

Try it on a real C64 and you'll see that it looks great.


I dont understand it. but anyhow this is vodoo in my eyes. the vic always uses the odd (or even?) lines, and that is that. check the "400" demo in vice, how come it works even on a lcd screen (I have that)? you say IF the vic scrolls at 0.5 pixelfs / frame, yeah sure, but how? it cant.
2007-05-21 16:18
ptoing

Registered: Sep 2005
Posts: 271
I think that technically it's 2 pictures and the picture is 400 pixels tall, but only the odd or even lines are shown, that's what they mean with 0.5 pixels i think. Not too sure tho.
2007-05-21 20:36
MagerValp

Registered: Dec 2001
Posts: 1060
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: 5028
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: 467
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.
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
kbs/Pht/Lxt
CA$H/TRiAD
MightyAxle
Nicron
jeroen1328
Mason/Unicess
DuncanTwain
Guests online: 81
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 No Bounds  (9.6)
7 Comaland 100%  (9.6)
8 Uncensored  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 Layers  (9.6)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Covert Bitops  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Crest  (9.3)
5 Censor Design  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Stinsen  (9.7)
3 Jeroen Tel  (9.6)
4 Linus  (9.6)
5 MacMagix  (9.6)

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