Max screen size/area in pixels?

Modding and Technical Issues

Moderator: Moderators

Post Reply
SparkyNZ
Vic 20 Enthusiast
Posts: 153
Joined: Tue Jan 18, 2011 2:23 am

Max screen size/area in pixels?

Post by SparkyNZ »

I bet this is a question for Mike. :-)

What is the maximum number of pixels the Vic chip can display on a TV screen - this is including moving the screen from top-leftmost to bottom-rightmost?

In other words, if you had to a design a monitor that would handle the Vic's max screen size in any x/y position, how many horizontal and vertical pixels would you require?
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Max screen size/area in pixels?

Post by Mike »

SparkyNZ wrote:I bet this is a question for Mike.
I just happen to be the first one to answer this time, but there are also other candidates.
What is the maximum number of pixels the Vic chip can display on a TV screen - this is including moving the screen from top-leftmost to bottom-rightmost?
I guess you are asking this because you want to know how to dimension the screen buffer for your own emulator, right?

As a first measure, I would like you to point to "vic-i.txt" on zimmers.net. This document states the maximum area where the pixel serializer does output for PAL, NTSC non interlaced and NTSC interlaced.

The relative timing between VIC fetches and video output and how much of the display area can sensibly be used are quite another matter. For example, do partial character displays at the edge count (i.e. not cropped by the monitor, but because the VIC disables the pixel output)?
SparkyNZ
Vic 20 Enthusiast
Posts: 153
Joined: Tue Jan 18, 2011 2:23 am

Re: Max screen size/area in pixels?

Post by SparkyNZ »

Mike wrote: Fri Feb 02, 2024 2:19 am I guess you are asking this because you want to know how to dimension the screen buffer for your own emulator, right?
Yes for the emulator at the moment but I'm also thinking about a VIC chip replacement for those 3 dead machines of mine. I still have the option of fiddling with an FPGA so just trying to get an overall understanding.

The whole VIC video scan is something I've yet to visualise. I'm familiar with VGA signal format but I've never had a go at generating a composite signal before. When you refer to partial character truncation by the VIC itself, I guess the screen origin can either start before the actual screen scan line or after the scanline finished on the right?

So working with a PAL monitor, I guess the maximum display resolution for any (non-VIC) signal would be 704×576?
Chip 6560-101 6561-101
System NTSC-M PAL-B
Cycles/line 65 71
Lines/frame 261 312
- interlaced 525 -
Crystal 14318181 Hz 4433618 Hz
Bus clock crystal/14 crystal/4
Screen width 201 229
Screen height 252 303
- interlaced 253,5 -
For every character the VIC-I is about to display, it first fetches the character code and colour, then the character appearance (from the character generator memory). The character codes are read on every raster line, thus making every line a "bad line".

71 cycles per line? So is that 3 VIC cycles to read char code, color code, pixel row? 71/3 -> 23 char width max?

I guess the cycles per line varies depending upon the actual (white) screen width?

So is the (PAL) VIC generating 704 pixels of cyan per line before the lines are reached containing the white screen area? That 229 screen width is confusing me too - that would be a screen of 28 chars.. but then the screen width setting can be "0-29 makes sense, >32 will be interpreted as 32."
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Max screen size/area in pixels?

Post by Mike »

SparkyNZ,

you try to draw conclusions from the document that are not in any way backed by what is actually the case:
SparkyNZ wrote:So working with a PAL monitor, I guess the maximum display resolution for any (non-VIC) signal would be 704×576?
The TV norms as such do not define any horizontal resolution in pixels. When digitizing the signal from analog sources, there exist norms to which number of pixels a horizontal scan should be sampled for further processing and storage. This number of pixels in turn does not relate to the pixel rate of any computer video chip, the VIC-20 in particular.
71 cycles per line?
For PAL, yes.
So is that 3 VIC cycles to read char code, color code, pixel row?
The colour RAM is read in parallel to the text RAM, which is evident from the schematics. Thus a character is 2 CPU cycles wide on the VIC-20.
71/3 -> 23 char width max?
No. As I wrote above, this is a number following from false assumptions.
I guess the cycles per line varies depending upon the actual (white) screen width?
No. The number of cycles used for video DMA per raster varies with the screen width, the total number of cycles remains at 71 (for PAL).
So is the (PAL) VIC generating 704 pixels of cyan per line before the lines are reached containing the white screen area? That 229 screen width is confusing me too - that would be a screen of 28 chars.. but then the screen width setting can be "0-29 makes sense, >32 will be interpreted as 32."
Oversized values in the register will lead to parts of the line being cropped horizontally for display, already on output of the VIC. Nonetheless, the offset to the next line will be honoured.

In short, you are grossly underestimating the necessary effort to create a FPGA replica of VIC-I. For what matters, there is a current project where Jon Brawn is working to exactly that goal, maybe it is a good idea you first read the corresponding threads here in Denial to get a grasp of it, "6560 FPGA Progress." and "FPGA 6561 - PAL Questions" in particular.

Greetings,

Michael
SparkyNZ
Vic 20 Enthusiast
Posts: 153
Joined: Tue Jan 18, 2011 2:23 am

Re: Max screen size/area in pixels?

Post by SparkyNZ »

Mike wrote: Fri Feb 02, 2024 8:24 am you try to draw conclusions from the document that are not in any way backed by what is actually the case:
That's just the iterative questioning process I follow. I guess I'm just not that smart or have limited intelligence or time to invest in my projects.

I am by no means a Vic purist so whatever I tinker with on the FPGA won't be composite output. My whole Vic/FPGA adventure has diverged down the track of making my own 6502 system but I am tinkering with bits of Vic (ie - playing with, for fun) because I always end up going back to the Vic/childhood no matter what I end up doing.

All I really wanted to know is how big a rectangle I'd need to display typical Vic displays. Maybe I just load up VICE and count how many Vic pixels they've allowed in their Window when CRT blur is turned off. That would be fine for my purpose right now, but I do also like to understand a bit more - and it doesn't help that I ask some of these questions when I'm awake at 3am and not sleeping properly.

Thanks for JonBrawn's thread.

I'll settle for 224 x 232 pixels for now.
Post Reply