Videopac / Odyssey2 forum

Programming the Videopac / Odyssey2 => Programming => Topic started by: Mux on June 27, 2017, 11:40:00 PM

Title: Screen Resolution
Post by: Mux on June 27, 2017, 11:40:00 PM
Hi all!

Odd question about the resolution of the o2. What's the screen resolution and how does it correspond to the grid / sprites?

For example, I know sprites are 8x8 pixels but on-screen they look doubled. Given that, what's the positioning resolution? If it's 8-bits, how much of those 8-bits are visible?

Similar question for the grid. In pixels, how tall / wide are the bars and the spacing inbetween?



Title: Re: Screen Resolution
Post by: gertk on June 30, 2017, 08:11:23 PM
From the Wiki:


  •     Intel 8244 (NTSC) or 8245 (PAL) custom IC
  •     160200 resolution (NTSC)
  •     16-color fixed palette; sprites may only use 8 of these colors
  •     4 88 single-color user-defined sprites; each sprite's color may be set independently
  •     12 88 single-color characters; must be one of the 64 shapes built into the ROM BIOS; can be freely positioned like sprites, but cannot overlap each other; each character's color may be set independently
  •     4 quad characters; groups of four characters displayed in a row
  •     98 background grid; dots, lines, or solid blocks

About the grid (from the datasheet 'Grokking the MCS-48 system'):

The grid display consists of an array of nine enclosed areas horizontally and
eight areas vertically. Each line segment between the nodes of the array is
individually controllable so that it may be presented or be inhibited.
A full array, consisting of all segments present, is created by combining nine
complete horizontal display bars with ten complete vertical display bars. Each
horizontal bar consists of nine concatenated bar segments, while a vertical bar
consists of eight concatenated bar segments. Each horizontal bar on the TV
screen is composed of three consecutive horizontal scan lines, while adjacent
bars are spaced by 21 horizontal scan lines. A vertical bar is made up of a
column of dot groups. Each dot group is programmable to consist of either two
or sixteen clock intervals (3.54Mhz) in width*. A conventional grid utilizes
two clock intervals while large area clock arrays, such as checkerboards,
utilize sixteen clock intervals. The spacing between adjacent vertical bars
is fourteen clock intervals. Thus, wide vertical bar segments that are adjacent,
appear to be continuous displayed areas. The grid is centered vertically on the
TV screen by allowing the first or top horizontal bar to start on the 24th
horizontal scan line relative to the end of vertical blanking (VBL). Similarly,
horizontal centering is accomplished by allowing the first or left-most vertical
bar to start on the 10th clock cycle from the end of horizontal blanking (HBL).

Title: Re: Screen Resolution
Post by: Mux on July 01, 2017, 03:16:41 AM
Thanks Gert!

I hadn't come across the 'grokking the mcs-48' so this clears it up nicely :-)


Title: Re: Screen Resolution
Post by: Mux on August 07, 2017, 06:34:00 AM
So it looks like there's something odd going on with the grid when it comes to the right intersections between right-most horizontal segments and vertical ones.

Since both horizontal and vertical segments start at the top/left origin, this would leave a gap on the bottom/right area of any intersection. While this isn't a problem when there's another horizontal segment, it does present an issue when there's nothing else there.

Anyone know how the hardware solves this? I'm guessing it checks whether either there is an intersection and then 'lengthens' the vertical- or horizontal bar by one dot.. Anyone have other suggestions?


Title: Re: Screen Resolution
Post by: Mux on August 12, 2017, 08:06:24 AM
Spitballing here, I'm guessing one way to do this is to check if the current line has a horizontal bar and the previous bar has a vertical bar, you extend either the horizontal or vertical bar by 4x3 pixels.

Anyone have any other suggestions?


Title: Re: Screen Resolution
Post by: Rene_G7400 on August 14, 2017, 09:34:27 AM
The length of the horizontal bars is such that it covers the top the next vertical bar too.
The system is too simple to do all kinds of checks.

Title: Re: Screen Resolution
Post by: Mux on August 14, 2017, 04:58:30 PM
It's not though... If you look at screenshots / captures or even the o2em grid editor, the horizontal bars are 32 pixels across with the vertical ones 24 pixels down. Yes, they overlap, but only the top/left, giving the 21 vertical lines (and thus a gap at corners) and 28 pixels across..


Title: Re: Screen Resolution
Post by: Rene_G7400 on August 14, 2017, 10:41:42 PM
Maybe I don't understand what you mean.
If you take a look at the attached picture you can see that horizontal grid lines cover the top of vertical grid lines at both the left side and the right side.

Title: Re: Screen Resolution
Post by: Mux on August 15, 2017, 12:45:22 AM
Ya know, you're absolutely correct!

While the spans are technically 32 pixels apart, they include 4 extra pixels to the right when any previous span is enabled, which is why the horizontal total grid is 292 instead of 288 (9*32). I swear I measured this correctly from a screenshot I googled but that might have been off.

Anyway, mystery solved! Thanks so much for clearing that up!!!