Jump to content

  • Log In with Google      Sign In   
  • Create Account





Dithered rendering

Posted by ManTis, in C64 08 March 2012 · 696 views

C64
Today I continued venture in high resolution bitmap mode of C64's VIC-II. As I mentioned yesterday, I started adding colors. First attempt looked butchered, but that was obvious for me when I started working on it. I used iteration depth as color for pixels in the 8x8 char area, and it gave me these blocky results:

Posted Image

I decided to use dithering. Since I have 16 levels of depth ( not counting the escaping shape ), each 4 levels would have their own dither level. It was a matter of finding some free memory, and poking it with tons of chars that would represent the dithering mask. My goal was to create something like

Posted Image

so I opened up my binary calculator and found the following values:

poke 16192,0
poke 16193,34
poke 16194,0
poke 16195,0
poke 16196,0
poke 16197,34
poke 16198,0
poke 16199,0
poke 16200,0
rem end char one
poke 16201,170
poke 16202,0
poke 16203,170
poke 16204,0
poke 16205,170
poke 16206,0
poke 16207,170
poke 16208,0
rem end char two
poke 16209,85
poke 16210,170
poke 16211,85
poke 16212,170
poke 16213,85
poke 16214,170
poke 16215,85
poke 16216,170
rem end char three
poke 16217,255
poke 16218,255
poke 16219,255
poke 16220,255
poke 16221,255
poke 16222,255
poke 16223,255
poke 16224,255
rem end char four

The free memory I used ( 16192-16224 ) was placed immediatly after my screen memory space. I've played around a bit with the code and ended with this result:

Posted Image

It may not be perfect ( colors are still blocky ), but it's SOMETHING. Maybe later today I'll add color+background dithering for smoother color transitions.

See you later then!




That's quite an impressive difference.

October 2014 »

S M T W T F S
   1234
567891011
12131415161718
1920 21 22232425
262728293031 
PARTNERS