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 > CSDb Discussions > Are the C64 pixels supposed to be square?
2008-04-24 11:17
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Are the C64 pixels supposed to be square?

So I was trying out a little vector effect, and while it looks normal in emulator, on my C64 with a 1084-monitor I get a distinct impression that it gets a bit stretched vertically.

Is this simply my monitor that is not correctly adjusted, or are C64 pixels non-square?
2008-04-24 11:18
chatGPZ

Registered: Dec 2001
Posts: 11360
nope, they are not :)
2008-04-24 11:20
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Are you answerin to the topic line or the last line of my message? Since I made a bit unfortunate wording, they are the exact opposite... :D
2008-04-24 11:31
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: Are you answerin to the topic line or the last line of my message? Since I made a bit unfortunate wording, they are the exact opposite... :D

Strictly from a PAL point of view they're not square, and no 1084-monitor have the same settings as another so that won't make the square either. Simply don't bother with it. We are more impressed by frame rate and size of your vector than square pixels. ;D
2008-04-24 11:32
chatGPZ

Registered: Dec 2001
Posts: 11360
the pixels are non square :)
2008-04-24 11:35
assiduous
Account closed

Registered: Jun 2007
Posts: 343
ive got a C64 hooked up to a tv card and the output looks slightly narrowed. the pixels are of about the same height as in emus but the width is abit smaller
2008-04-24 11:41
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Quote: Strictly from a PAL point of view they're not square, and no 1084-monitor have the same settings as another so that won't make the square either. Simply don't bother with it. We are more impressed by frame rate and size of your vector than square pixels. ;D

Yeah, ignoring it seems like the easiest way out. However I doubt people will be impressed with either size or speed or my vector, but that's another story! :)
2008-04-24 12:00
saehn
Account closed

Registered: Apr 2006
Posts: 44
I just make sure graphics look good on the original Commodore monitors, can't help that some people will always use emulators. Here's some more interesting info on the subject.

http://noname.c64.org/csdb/forums/index.php?roomid=13&topicid=2..
http://en.wikipedia.org/wiki/Pixel_aspect_ratio
http://lurkertech.com/lg/pixelaspect/
2008-04-24 13:11
Oswald

Registered: Apr 2002
Posts: 5086
generally in multicolor mode ppl handle the pixels being twice as wide as tall. so in a vector routine you'd want to divide x coords by two. in hires nobody cares, and uses it as if it was squares.
2008-04-24 13:40
Sander

Registered: Jan 2002
Posts: 493
Ofcourse it was intended to be square :)
And i could not imagine, besides technical issues, why they'd have shaped it otherwise. I suppose it's really the monitors and tv's stretching things.
2008-04-24 13:43
ptoing

Registered: Sep 2005
Posts: 271
I have the theory that the pixels are not only not square but that because of this the sprites have such an odd size. I mean, what? 24x21 pixels? Why not 24x24? Also it seems that 24x21 is pretty much square on a not totally fudged with c64 monitor if you keep the aspect ratio 4:3. Also measured this on a few TVs where it was. Bigger stuff within this ratio as well.
2008-04-24 13:47
chatGPZ

Registered: Dec 2001
Posts: 11360
its not the reason for sprites beeing 21 pixel high... thats simply because 64/3=21 (+1)
2008-04-24 13:47
WVL

Registered: Mar 2002
Posts: 899
Quote: I have the theory that the pixels are not only not square but that because of this the sprites have such an odd size. I mean, what? 24x21 pixels? Why not 24x24? Also it seems that 24x21 is pretty much square on a not totally fudged with c64 monitor if you keep the aspect ratio 4:3. Also measured this on a few TVs where it was. Bigger stuff within this ratio as well.

24*21 is because of the way the vic works and the maximum # of cycles on each line.. With sprites being 3 bytes wide, the VIC can _just_ manage to read all the data from memory in a badline. That explains the 24 pixels.

The 21 pixels high simply comes because this is closest to 64 bytes (a power of 2), so they can be adressed nicely.
2008-04-24 13:49
ptoing

Registered: Sep 2005
Posts: 271
24x21 still is pretty much spot on square on TVs and such, so if anything it's a nice coincidence.

Also LOTS of systems, for example arcadeboards, have nonsquare pixels. It's not that uncommon.
2008-04-24 13:53
Oswald

Registered: Apr 2002
Posts: 5086
al charpentier the designer about it:

"I was going to use memory running just under 2 mhz meaning only 114 memory fetches per line .. I figured the processor would need atleast 40 of those fetches. 40 was a nice architectural number because there are also 40 pieces of background information so the background information and cpu slices could be easily interleaved. So 114 minus 40 fetches for the cpu and 40 for the background left me with 34 fetches. I needed 8 fetches to pick up the sprite pointers that left 26 fetches if I had 8 sprites that gave me 3 fetches for each sprite

...

Charpentier then looked for a mutiple of 3 that would approach a power of 2 so that sprites could be stored efficiently "it happened that 24 by 21 bits gave 63 bytes of information he said"

http://www.commodore.ca/gallery/magazines/c64_design/5.jpg
2008-04-24 14:05
Cruzer

Registered: Dec 2001
Posts: 1048
I noticed this already back in the days when I was doing C64 gfx on Amiga, and after porting it to C64 it looked a bit narrower. I think the aspect ratio is about 9:10.
2008-04-25 08:47
Graham
Account closed

Registered: Dec 2002
Posts: 990
None of the old 8 bit machines has square pixels. On C64 the pixels are about 5% taller than wide, on Atari 8 bit machines it's the other way round: Pixels are about 5% wider than tall.

Square pixels on PAL require a pixel clock of 14.75 MHz, but that's for interlace resolution so for non-interlace this makes it 7.375 MHz. A PAL C64 has a pixel clock of 7.882 MHz, a PAL Atari has a clock of 7.094 MHz.
Then there is also the non-standard frequencies used for those machines, I am not sure if rasterlines get scaled because of this, and if yes, how.
2008-12-30 00:21
Zagon
Account closed

Registered: Apr 2002
Posts: 14
First, sorry to revive an old topic but I must have missed it when it
was current.

I believe that the vertical and horizontal speed speed of the electron
beam of a CRT television set is constant. The video signal doesn't
control the speed of the beam but only when it should be reset to the top
and to the left.

If this holds true then the pixel width is determined by the dot clock
and the pixel height by the scan line frequency.

This means that we can calulate the teoretical pixel aspect ratio of a
given system if we know the scan line frequency and the dot clock of
that system.

standard dot clock MHz scan line kHz
square PAL 7.37500000 15.62500000
square NTSC 135/22 15.73426573
c64 PAL 7.88198756 15.63886420
c64 NTSC 7.88198756 15.73426484
c64 oldNTSC 7.88198756 15.98011272

c64 PAL
x-ratio = 7.37500000 / 7.88198756
y-ratio = 15.62500000 / 15.63886420
pixel AR = x-ratio / y-ratio = 0.93650794

(the following are calculated in the same way)
c64 NTSC pixel AR = 0.75000000
c64 oldNTSC pixel AR = 0.76171875

I'm sorry to say that I have no way to control these numbers at the
moment. I remember that a 24x21 sprite seemed quite square on a PAL
system. The calculated PAL AR would have a 24 pixel wide square about
22.5 pixels high so at least the numbers are not totally off.
2008-12-30 07:39
AmiDog

Registered: Mar 2003
Posts: 97
Might just be me, but when I set up a 1084, I usually set it up so that all borders (left/right/top/bottom) are more or less equally thick. The 1084 being a 4:3 monitor would make the 320x200 pixels cover an area with a 4:3 aspect ratio and thus give a pixel aspect ratio of (200/3)/(320/4)=0.833...

I think I once measured the non-border area of the C64 display on the 29" Sony CRT I was using at that time, but don't remember the result...
2008-12-30 07:56
Mace

Registered: May 2002
Posts: 1799
AmiDog, setting the border equally thick by hand on a 1084 is hardly a scientific approach :-)
2008-12-30 16:55
Wile Coyote
Account closed

Registered: Mar 2004
Posts: 646
My Commodore monitor has an option to adjust the screen height, which came in handy for PAL Snes games, which featured black upper and lower borders, with the resultings image have a slightly squashed look. I used to adjust the screen to remove the upper and lower borders. It improved the look Street Fighter II Turbo, lots.
2008-12-31 15:03
Zagon
Account closed

Registered: Apr 2002
Posts: 14
Well, the calulated aspect ratios assumes an unadjusted 4:3 CTR television set. Adjusted monitors that shows more of the side border would have a narrower aspect ratio.

However, the calculated aspect ratios could still be interesting, for emulation purposes perhaps?
2009-01-02 11:16
Mindcooler

Registered: Nov 2006
Posts: 28
This reminds me of how "all" 8- and 16-bit games are squished vertically in PAL. Seems no-one bothered to PAL-fix games, probably too small a market. Today TV sets usually have widescreen options so you can un-squish the image to make things squarer and get rid of those borders.

Get rid of those borders.. sounds somewhat demoscenish.
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
radius75
Guests online: 58
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 The Demo Coder  (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 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Triad  (9.2)
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.058 sec.