Boulder Dash Forum Forum Index Boulder Dash Forum
The only Boulder Dash discussion board in English language!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Square pixels on a real C64?

 
Post new topic   Reply to topic    Boulder Dash Forum Forum Index -> Games: 8-bit
View previous topic :: View next topic  
Author Message
subotai
Member


Joined: 25 Jan 2009
Posts: 251

PostPosted: Tue Oct 30, 2012 7:00 pm    Post subject: Square pixels on a real C64? Reply with quote

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.
Back to top
View user's profile Send private message
LogicDeLuxe
Member


Joined: 15 Jul 2007
Posts: 602

PostPosted: Tue Oct 30, 2012 9:43 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
subotai
Member


Joined: 25 Jan 2009
Posts: 251

PostPosted: Wed Oct 31, 2012 1:23 am    Post subject: Reply with quote

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:
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:
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:
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 Smile


Last edited by subotai on Fri Nov 02, 2012 9:52 am; edited 1 time in total
Back to top
View user's profile Send private message
subotai
Member


Joined: 25 Jan 2009
Posts: 251

PostPosted: Wed Oct 31, 2012 6:29 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
subotai
Member


Joined: 25 Jan 2009
Posts: 251

PostPosted: Sun Jan 20, 2013 10:31 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Boulder Dash Forum Forum Index -> Games: 8-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group