Square pixels on a real C64?

Everything about the old and new Boulder Dash games for C64, Atari, ...

Moderator: Admin

Post Reply
subotai
Member
Posts: 251
Joined: Sun Jan 25, 2009 4:19 pm

Square pixels on a real C64?

Post by subotai »

Hello,

I was wondering, if the pixels on are real C64 machine are square or are strechted in vertical size like in the mode 13h for DOS games? Only a friend of mine had a C64 and I can't really remember, how it was. But square pixels seems to be a bit flat to me.
User avatar
LogicDeLuxe
Member
Posts: 637
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

Short answer: No, they are not square. And there is a difference between PAL machines and NTSC machines, too.

For the long answer, there is this very detailed article just about everything of the C64's video chip: http://www.cebix.net/VIC-Article.txt

Some noteworthy aspects:
While lores VGA modes are 320x200 pixel in a 4:3 aspect ratio, the C64 has more pixels, since there is this rather large border around the main 320x200 pixel area.
It totals (for the most common C64s) to 403x284 for PAL and 418x235 for NTSC, each in a 4:3 aspect ratio.
subotai
Member
Posts: 251
Joined: Sun Jan 25, 2009 4:19 pm

Post by subotai »

Thanks for the answer and for the link to the article! The difference in PAL is not very big. Here is the calculation that I made for Mode13h:

Mode13h uses a resolution of 320*200. The resolution for the 4/3 aspect ratio can be 320*240. The width fits, not the height.

Code: Select all

scalefactor_y:=240/200 ( = 1.2)
scalefactor_x:=320/320 ( = 1.0)
This works good for Mode13h. There are less fields visible in vertical size, but as the vertical resolution is lower (200 pixels instead of 240 pixels), this is as intended.

O.k. now for the C64 aspect ratio:

Code: Select all

PAL:
scalefactor_X:=(320/403);
scalefactor_Y:=(240/284);
As you can see, the picture gets smaller. So I just adjust the scaling taking the lower value for not loosing any pixels.

Code: Select all

scalefactor_X:=(320/403) * (284/240); // = 0.939; no big difference for PAL
scalefactor_Y:=(240/284) * (284/240); // = 1 ; no scaling
Same procedure for NTSC. Is this calculation correct? I'm not sure. The C64 border is irritating me a bit. Due to the border, the visible area should be bigger in my game and smaller on a C64!?

Thanks :-)
Last edited by subotai on Fri Nov 02, 2012 9:52 am, edited 1 time in total.
subotai
Member
Posts: 251
Joined: Sun Jan 25, 2009 4:19 pm

Post by subotai »

Well, I didn't get it. But this can't be correct because I'm not using the border. I'll just drop it, but thanks again for your reply.
subotai
Member
Posts: 251
Joined: Sun Jan 25, 2009 4:19 pm

Post by subotai »

My calculation seems not to be too bad. In the VICE-emulator, the vertical size is stretched in NTSC mode (This only works in Fullscreen mode). Finally the height of the upper and lower border is less.

VICE seems to be a good reference. I use the "true aspect ratio" for the calculation that you can find in the video settings.
Post Reply