Jump to content
IGNORED

Video Life without flicker, how?


SvOlli

Recommended Posts

Lately I've been playing a bit CommaVid's "Video Life" cartridge a bit. It's quite impressive. First of all it's only one of two carts that use the "CV" "bankswitching" type: just 2k of ROM, but 1K of additional RAM. So it's not really "bankswitching".

 

And I'm really impressed how they implemented the "framebuffer". They use triple sprite with far spacing and display one stripe down, so you get 8 pixel data, 8 pixel nothing, 8 pixel data, ... until the 48 "odd" of the 96 pixel are displayed. The next picture will then display 8 pixel nothing, 8 pixel data, 8 pixel nothing, ... until the "even" 48 pixels are displayed as well.

 

I tried to hack something similar myself, but instead of an image that's only a bit darker, but all in all very viewable, I get flicker like hell. So as I'm digging deeper into the original "Video Life" code, I want to ask if anyone has already been there, and is willing to share the secret to save me some time on this weekend. ;-)

 

Thanks in advance,

SvOlli

Link to comment
Share on other sites

To round this up: here's what I had in mind. Pretty lame to what eshu's come up with, but it'll serve my purpose. :)

 

Very nice!

 

If you want to reduce the flickering a bit, a popular technique to do so are "flicker blinds". This is an "interlaced" version of the "Venetian Blind Technique" used in Video Chess.

 

The idea is to move the sprites back and forth by 8 pixels in each line and switching the pattern every frame. For example, the batari basic titlescreen kernel does this.

 

post-27536-0-12989000-1339797432_thumb.pngpost-27536-0-26019800-1339797633_thumb.png

Link to comment
Share on other sites

Thanks!

 

I was thinking about this as well, but in the end I didn't do it for two reasons:

- I had trouble once with moving a sprite more than the range of -8 to +7, and didn't want to dive into this again, although I've seen that it's possible.

- I'm using a modded PAL Atari with AV (FBAS) out, connected to a VGA converter or a beamer. Both don't "overlay" the half pictures and this way the image looks a bit better, because of the regularity.

 

And I've got 10 cycles on the left of the image to spare, which I could use for some color cycling routine. I'm still thinking demo here, trying to get the most effects in one scanline. ;-)

Link to comment
Share on other sites

You can check out my own bitmap code in this old thread to see how to move the sprites 8 pixels left and 8 pixels right to get flicker-blinds. The pictures in that thread also show how you can use dithering to get a more textured picture. There were some utilities posted or linked to in that thread for converting a dithered monochrome picture into the data values needed for the sprites. You start with a picture, scale it down to the right size (in this case, 96x192), convert it to a grayscale image, then convert the grayscale image to a dithered monochrome image using some dithering algorithm-- for the pictures I did, I just used PaintShop Pro to do it all. Then you use some other utility to convert the dithered monochrome image to 1s and 0s, and split them up into 8-bit "columns" to get the data for the sprites.

 

Of the pictures I did, the two best are shown below. Note, I cranked up Stella's phosphor blending to 100% on the Spock image to get a brighter picture; it's actually a lot darker otherwise.

 

post-7456-0-21125500-1339804275_thumb.png

 

post-7456-0-41124600-1339804297_thumb.png

 

Edit: By the way, the method you used-- simple flickering, or shifting the sprites on alternating frames rather than on alternating lines-- actually looks better on some modern HD TVs that automatically convert the non-interlaced picture to an interlaced picture.

Edited by SeaGtGruff
  • Like 1
Link to comment
Share on other sites

You can check out my own bitmap code in this old thread to see how to move the sprites 8 pixels left and 8 pixels right to get flicker-blinds.

Ah, thanks for pointing me out.

 

Edit: By the way, the method you used-- simple flickering, or shifting the sprites on alternating frames rather than on alternating lines-- actually looks better on some modern HD TVs that automatically convert the non-interlaced picture to an interlaced picture.

Same goes for (at least my) beamer and my Video-to-VGA converter. That's what I mean with the second reason for sticking with the "Video Life" approach.

Link to comment
Share on other sites

I did some updates to the code. The trick of moving the sprites back 8 pixels to the original position is very picky about timing. That's one of those things I'd never figured out all by myself. Thank you, Joe and SeaGtGruff.

 

While the old version was a dual-line kernel display, the new version some kind of "simulates" a dual-line kernel by switching the "sprite-lines" every half frame. The new version is also trimmed down to 96x85 instead of 96x96 for two reasons: now the graphics fit in 1K, as intended, and I can access the graphics data without "penalty cycles" for page crossing.

 

I did also some comparison of the output as well. First, my Video->VGA converter, for this I've created an ASCII sketch.

 

The number indicates the line number, a small letter indicates that the sprite is shown on first half frame, a capital letter is the same for the second half frame.

 

Here's what it looked like using the old code:

0a..0c..0e..0g..0i..0k..
..0B..0D..0F..0H..0J..0L
1a..1c..1e..1g..1i..1k..
..1B..1D..1F..1H..1J..1L
2a..2c..2e..2g..2i..2k..
..2B..2D..2F..2H..2J..2L

Using the new code:

0a..0c..0e..0g..0i..0k..
..0B..0D..0F..0H..0J..0L
..1b..1d..1f..1h..1j..1l
1A..1C..1E..1G..1I..1K..
2a..2c..2e..2g..2i..2k..
..2B..2D..2F..2H..2J..2L

 

So, the old code looked slightly better, but that's the only time that this is the case.

 

In Stella it looks the same (with phosphor) or better (without phosphor).

 

I also attached two small (2 seconds each) films taken from my beamer to show the different flickering there.

 

So I come to conclusion, that interlacing gives the viewing better experience, except for the VGA converter, but the disadvantage there the rather minor.

 

Next: some code cleanup...

96pixel_movies.zip

bitmap.bin.gz

Link to comment
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...