Maximum Resolution on Dreamcast

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
zilti
DCEmu Newbie
DCEmu Newbie
Posts: 8
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Mon Jan 19, 2009 2:46 am
Has thanked: 0
Been thanked: 0

Maximum Resolution on Dreamcast

Post by zilti »

Hi there,
What's the maximum resolution usable on a Dreamcast?
I've read about 800x600 (and technically, it's even a lot more).
Now what's true? 640x480 or 800x600?
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Maximum Resolution on Dreamcast

Post by BlackAura »

The first limit you'll run up against is the number of scanlines you can display on a TV. The active display area of an NTSC TV is 480 scanlines (interlaced), while the display area of a PAL TV is 576 scanlines (again, interlaced). Neither the NTSC nor PAL standards allow for any more scanlines than this, and there's no way to try to pack more scanlines in. This is a hard limit.

The second limit is the number of times you can change colours in a single scanline. The signal for each scanline is analog, so there's no hard limit - pixels just start to blur together. DVDs use 720 pixels per scanline, but you can use up to 768 pixels per scanline and still be able to make out single pixels on a decent (CRT) TV.

So, on a TV, you're looking at 768x480 for NTSC, and 768x576 for PAL. 768x480 is kind of weird, since the pixels aren't square, but it works. It's not generally used though - 640x480 is a nicer resolution to work with in general.

On a VGA monitor, you can get away with 800x608. I suspect that the DC's video output hardware was designed to handle the highest possible PAL resolution (768x576). Since 800x608 is only 8% larger than 768x576, we can just about get away with it. It eats up nearly 2MB of video RAM just for the framebuffers - anything more than that, and there wouldn't be any room left over for textures.

Note that it's 800x608, not 800x600. The width and height both need to be divisible by 32 if you want to be able to use the 3D hardware.

This only works on a VGA monitor - there is no way to get this to work on a TV, nor is there any way to hook up a component video connection or similar.
zilti
DCEmu Newbie
DCEmu Newbie
Posts: 8
Joined: Mon Jan 19, 2009 2:46 am
Has thanked: 0
Been thanked: 0

Re: Maximum Resolution on Dreamcast

Post by zilti »

Thank you for the info :)
So it's impossible to use 800x608 without a VGA Box, even if the TV is Full-HD or HD-Ready and thus able to display this resolution, right?
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: Maximum Resolution on Dreamcast

Post by Ex-Cyber »

zilti wrote:Thank you for the info :)
So it's impossible to use 800x608 without a VGA Box, even if the TV is Full-HD or HD-Ready and thus able to display this resolution, right?
Right, because it's not so much a question of whether the TV can physically display it as the fact that there's no recognized way to encode it in the first place for NTSC/PAL-derived signaling.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Re: Maximum Resolution on Dreamcast

Post by nymus »

What resolution (geometry??) is commonly used to create widescreen in standard definition games in either PAL or NTSC? eg on ps2/wii?
behold the mind
inspired by Dreamcast
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Maximum Resolution on Dreamcast

Post by BlackAura »

nymus wrote:What resolution (geometry??) is commonly used to create widescreen in standard definition games in either PAL or NTSC? eg on ps2/wii?
The same as 4:3 games. There's absolutely no difference between a widescreen and non-widescreen signal, so all you need to do is squash the screen so it'll look correct when stretched out to a 16:9 display.

For 3D graphics, you just need to change the horizontal field of view angle. That'll squish everything horizontally, and will render a wider area. 2D graphics are typically drawn assuming one aspect ratio, and they look either stretched or squashed in the other one.

You can to use a resolution that gives you square pixels (848x480 / 1024x576), but it's doubtful that anything will be able to display it. There's really no point - using a display with non-square pixels is easy enough anyway, especially for 3D.

The PS2 is actually capable of displaying 720p and 1080i with the right cable. I don't know if any games used it.
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Re: Maximum Resolution on Dreamcast

Post by nymus »

Ah. So widescreen on PAL and NTSC requires a software solution because the hardware resolution is fixed (per the respective standard)?

So is it possible to implement a hardware widescreen resolution eg 640x360 on the dreamcast vga output?
behold the mind
inspired by Dreamcast
zilti
DCEmu Newbie
DCEmu Newbie
Posts: 8
Joined: Mon Jan 19, 2009 2:46 am
Has thanked: 0
Been thanked: 0

Re: Maximum Resolution on Dreamcast

Post by zilti »

Yes, should be possible.
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7497
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Has thanked: 4 times
Been thanked: 9 times
Contact:

Re: Maximum Resolution on Dreamcast

Post by Quzar »

nymus wrote:Ah. So widescreen on PAL and NTSC requires a software solution because the hardware resolution is fixed (per the respective standard)?

So is it possible to implement a hardware widescreen resolution eg 640x360 on the dreamcast vga output?
Yes. The reason though that software aspect ratio changing is used is to not have the massive loss of quality that lobbing off a quarter of the screen would give ;)
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Maximum Resolution on Dreamcast

Post by BlackAura »

nymus wrote:Ah. So widescreen on PAL and NTSC requires a software solution because the hardware resolution is fixed (per the respective standard)?

So is it possible to implement a hardware widescreen resolution eg 640x360 on the dreamcast vga output?
Yes, and yes. The number of scanlines in PAL and NTSC is absolutely fixed, but the number of pixels per scanline is variable, with 768 being pretty close to the upper limit. That's not enough to output enough pixels for a real 16:9 resolution, and you can't decrease the number of scanlines.

VGA has no such limitations - timing, number of scanlines, and number of pixels per scanline are all flexible. Any resolution should be possible from the Dreamcast, as long as the VGA timings make sense, and the width and height are multiples of 32 (PVR's tile size).

SD digital TVs (plasmas / LCDs) usually have a resolution of either 848x480 or 852x480. The closest you could get to that resolution on the Dreamcast and still be able to use the PVR would be 864x480, which will probably blur almost as much as 768x480 would. Unless there's some way to ignore the edge pixels of the framebuffer, of course.
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Re: Maximum Resolution on Dreamcast

Post by nymus »

Okay, I've always wanted to understand the math behind this so I did a bit of googling and am beginning to wonder if the 'ol DC might be capable of more...

- We know that the RAMDAC inside Dreamcast runs at 100MHZ and according to formula (http://en.wikipedia.org/wiki/RAMDAC)

pixel clock = horizontal pixels x vertical lines x 1.4 (for blankings) x refresh rate

using 848x480 we get a pixel clock of (848x480 x 1.4 x 60 = 34.2 MHz)

Is this math wrong?

The video registers that hold the display size seem to take 10-bit values so we could place a value of 1023 for horizontal size....

What is the limitation? Should we account for bytes per pixel?
behold the mind
inspired by Dreamcast
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Maximum Resolution on Dreamcast

Post by BlackAura »

For VGA output, that should work. VGA consists of five separate analog signals (red, green, blue, horizontal sync, vertical sync), each of which are carried on dedicated signal lines. Since the signal lines carry the actual signal, you can use almost any resolution you like, up to the point where the receiving hardware stops being able to decode the signal.

Y'know... I'm not actually sure what the limit is for NTSC and PAL. I do know that most analog TVs aren't going to be able to display anything more than a DVD's 720 pixels, and probably not even that, but I honestly have no idea about LCDs and Plasmas. Since they're digital anyway, the amount of resolution you can cram in there will depend entirely on how good the composite decoder in the TV is.

I do know that the signals in NTSC and PAL are amplitude modulated by a carrier wave. I guess the frequency of that carrier would be the upper limit on how many pixels you can cram in before they start to blur together.

I don't see any problem in actually generating an 848x480 composite signal from a Dreamcast. It's just a question of how messed up the signal becomes once it's decoded by the TV. You wouldn't be able to use the 3D hardware at that resolution, of course.
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: Maximum Resolution on Dreamcast

Post by Ex-Cyber »

BlackAura wrote:I do know that the signals in NTSC and PAL are amplitude modulated by a carrier wave. I guess the frequency of that carrier would be the upper limit on how many pixels you can cram in before they start to blur together.
It's a bit more complicated than that. I don't remember all the details, but it depends on not only the basic number of pixels but also how fast the color components are changing in general. You could have just, say, 128 pixels, and going from one end of the spectrum to the other on a pixel edge can still cause the color to be distorted.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Re: Maximum Resolution on Dreamcast

Post by nymus »

Assuming VGA output:

since 848x480 requires just 34MHz and the registers can hold up to 1023 as a value, theoretically we should be able to have a maximum display of (1024x1024) requiring 88Mhz at 60Hzwhich is still less than the 100Mhz available? (or am I understanding this incorrectly?) This would require just a ~4MB framebuffer.

Also why wouldn't you be able to use the 3D hardware at these high resolutions? Isn't the PVR supposed to be able to handle higher resolutions when doing FSAA?

Is there a way to set the refresh rates eg 60Hz, 72Hz? I only know of the "clock double" setting for VGA.
behold the mind
inspired by Dreamcast
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: Maximum Resolution on Dreamcast

Post by Ex-Cyber »

nymus wrote:Also why wouldn't you be able to use the 3D hardware at these high resolutions? Isn't the PVR supposed to be able to handle higher resolutions when doing FSAA.
It's not that the resolution is high, it's that 848 is not an integer multiple of 32, and PVR works by decomposing the scene into 32x32 tiles.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Maximum Resolution on Dreamcast

Post by BlackAura »

Ex-Cyber wrote:It's a bit more complicated than that. I don't remember all the details, but it depends on not only the basic number of pixels but also how fast the color components are changing in general. You could have just, say, 128 pixels, and going from one end of the spectrum to the other on a pixel edge can still cause the color to be distorted.
Yeah, that's probable. There are all kinds of artefacts in NTSC / PAL composite signals.

Just found this - What Happened to My Colors!?! Displaying Console Computer Graphics on a TV over at Gamasutra.

That seems to suggest that the number of pixels you can cram into a single line is limited by the amount of bandwidth available for the signal, and that the three signals in NTSC (which is in the rather weird YIQ colour space) have progressively less bandwidth available. It sounds like you have an effective resolution in NTSC of close to 640x480 for Y (luminance), but probably not even half that for either of the two colour channels, and that the best thing that could happen to more detail is that the encoder filters it out. Or it interferes with other parts of the signal.

I guess that also explains the flickering colours and buzzing noises that my old C64 used to make.
nymus wrote:since 848x480 requires just 34MHz and the registers can hold up to 1023 as a value, theoretically we should be able to have a maximum display of (1024x1024) requiring 88Mhz at 60Hzwhich is still less than the 100Mhz available? (or am I understanding this incorrectly?) This would require just a ~4MB framebuffer.
Yeah, I think that would work. Although I don't know how the 3D hardware and the TV encoder share access to VRAM. Having a framebuffer that large might slow the PVR hardware down to the point that it's no longer usable.

Looking at the hardware registers, I can't see any reason that you couldn't use a framebuffer size of 864x480 but display only 848x480. You just need to set the framebuffer pointer correctly, and set the linestride register to the framebuffer size, not the output size.
User avatar
az_bont
Administrator
Administrator
Posts: 13567
Joined: Sat Mar 09, 2002 8:35 am
Location: Swansea, Wales
Has thanked: 0
Been thanked: 0
Contact:

Re: Maximum Resolution on Dreamcast

Post by az_bont »

Hasney wrote:
BlackAura wrote: The PS2 is actually capable of displaying 720p and 1080i with the right cable. I don't know if any games used it.
Yeah, I think the only game to use it was GT4.
Gran Turismo and Tourist Trophy, which was also developed by Polyphony Digital, support 1080i. Wikipedia used to list 'Spongebob Squarepants: Battle for Bikini Bottom' as supporting both 720p and 1080i, but it has since been removed from the list (though it does get a brief mention in this article, which also states that GT4 runs internally at 1280x1080).

EDIT: There are a few interesting comments on this digg post about HDTV resolution support on the PS2. It suggests that the PS2 is only really capable of 960x540 (which makes sense, as this is the resolution that you can capture screenshots at in GT4), and lists NHL 2004 as supporting 1080i and Spongebob as supporting 720p and 1080i.
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Maximum Resolution on Dreamcast

Post by BlackAura »

(Not knowing anywhere near as much about the PS2's hardware as I do about the Dreamcast's...)

I know that there's nowhere near enough VRAM in the PS2 to store a high-def framebuffer. Assuming you actually want textures, something along the lines of 960x540 sounds about right - that's about 2MB for the framebuffer. That still lets you use a couple of reasonably sized textures, and with proper batching, you can use one texture while you're DMAing the other over from main RAM. You only need to store one copy of the framebuffer in VRAM on the PS2 - the framebuffer is copied to main RAM first, and the output hardware displays the copy in main RAM.

Gran Turismo is claimed to run internally at 1280x1080. That'd require about 5.3MB for the framebuffer alone, so that's obviously impossible. Since it runs at 1080i, rather than 1080p, they could easily have cheated - instead of rendering the entire frame, just render half of it. That drops it to 1280x540. Probably just about doable.

You could also cheat with the horizontal resolution. The normal size of a 1080i screen is 1920x1080. You could just use pixel doubling, and reduce that to 960x540. It'd still technically be 1080i, and you probably wouldn't notice the drop in horizontal resolution.

It's also possible that each frame is 1280x540, but the screenshot mechanism scales it to 960x540 so it has the right aspect ratio.
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Maximum Resolution on Dreamcast

Post by Chilly Willy »

Sorry if this is considered thread necromancy, but I wanted to ask about 800x608 mode... that's disabled in the repo.

Code: Select all

	/* 800x608 NTSC 60Hz (VGA) [BROKEN!] */
	/* DM_800x608_VGA */
	{
		DM_800x608,
		320, 240,
		VID_INTERLACE,
		1/*CT_ANY*/, /* This will block the mode from being set. */
		0,
		262, 857,
		164, 24,
		21, 82,
		141, 843,
		24, 264,
		0, 1,
		{ 0, 0, 0, 0 }
	},
Note how the video cable field is used to prevent the mode from being selected. I've verified that in Doom. I have support for 800x608 with the VGA cable in the code, but the mode never worked right, so I looked at the source to see why and discovered the above. Is that going to be fixed at some point? That's the highest mode my 21" TIMM will support, and I'd love to have it available.
User avatar
Christuserloeser
Moderator
Moderator
Posts: 5948
Joined: Thu Aug 28, 2003 12:16 am
Location: DCEvolution.net
Has thanked: 10 times
Been thanked: 0
Contact:

Re: Maximum Resolution on Dreamcast

Post by Christuserloeser »

Chilly Willy wrote:Sorry if this is considered thread necromancy, but I wanted to ask about 800x608 mode... that's disabled in the repo.

Code: Select all

	/* 800x608 NTSC 60Hz (VGA) [BROKEN!] */
	/* DM_800x608_VGA */
	{
		DM_800x608,
		320, 240,
		VID_INTERLACE,
		1/*CT_ANY*/, /* This will block the mode from being set. */
		0,
		262, 857,
		164, 24,
		21, 82,
		141, 843,
		24, 264,
		0, 1,
		{ 0, 0, 0, 0 }
	},
Note how the video cable field is used to prevent the mode from being selected. I've verified that in Doom. I have support for 800x608 with the VGA cable in the code, but the mode never worked right, so I looked at the source to see why and discovered the above. Is that going to be fixed at some point? That's the highest mode my 21" TIMM will support, and I'd love to have it available.

It'd be awesome to see this mode being used in OpenBoR-DC v3 and I know that SX planned on supporting it with the recent update of OpenBoR's standard resolutions.

- Is there anyone that has the time and knowledge to look into this ?
Insane homebrew collector.
Post Reply