Widescreen hacks

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.
Post Reply
patbier
DC Developer
DC Developer
Posts: 152
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri Aug 29, 2003 1:25 am
Has thanked: 0
Been thanked: 0

Widescreen hacks

Post by patbier »

Hello,

Did you have a look at the widescreen hacks ?

http://assemblergames.com/l/threads/wid ... acks.58620

4/3
Image

16/9
Image

I'm curious about what really changes. Any ideas ?
ImageAlice Dreams Tournament Dreamcast fans : http://www.facebook.com/alicedreamst
In August 2015, we had to change "Dynamite Dreams" name to "Alice Dreams Tournament"
cube_b3
Ex-Newsposter
Ex-Newsposter
Posts: 4038
Joined: Tue May 28, 2002 6:51 am
Location: pakistan,karachi
Has thanked: 13 times
Been thanked: 6 times
Contact:

Re: Widescreen hacks

Post by cube_b3 »

I read the news posts on them but other than that I don't know much.
|darc|
DCEmu Webmaster
DCEmu Webmaster
Posts: 16378
Joined: Wed Mar 14, 2001 6:00 pm
Location: New Orleans, LA
Has thanked: 111 times
Been thanked: 91 times
Contact:

Re: Widescreen hacks

Post by |darc| »

I've used Swiss to force anamorphic widescreen on GameCube before, it works well. Good idea.
It's thinking...
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Widescreen hacks

Post by SWAT »

I think this is a hack of viewport/ratio in rendering code by one float value in memory.
It's not hardware settings, just SDK/engine param.
For every game need search special place for it, it's not universal hack for all :(
Image
patbier
DC Developer
DC Developer
Posts: 152
Joined: Fri Aug 29, 2003 1:25 am
Has thanked: 0
Been thanked: 0

Re: Widescreen hacks

Post by patbier »

Thanks for answers,

is there a way to do the same with KOS ?
ImageAlice Dreams Tournament Dreamcast fans : http://www.facebook.com/alicedreamst
In August 2015, we had to change "Dynamite Dreams" name to "Alice Dreams Tournament"
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5666
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Widescreen hacks

Post by BlueCrab »

Sure, you can do it with KOS, but how you do it depends on how you're doing the rendering.

If you're talking 3D stuff with KGL, for instance, you'd just change how you set up your perspective matrix. I think you should just need to set up your field of view to be wider with gluPerspective(), in the KGL case.

*NOTE: I don't do 3D stuff, so I might be a bit off the mark on that... :wink:
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: Widescreen hacks

Post by PH3NOM »

It is good to understand the basics of Pixel Aspect Ratio (PAR) and Display Aspect Ratio(DAR).
The Dreamcast Video outputs a DAR of 4:3, i.e. 640x480.
The "Widescreen hack" changes the PAR and expects the TV or monitor will do the work of stretching the 4:3 image to 16:9, at 480p that would be ~853x480 display.
Think of it as writing to a 853x480 framebuffer, then scaling the 853x480 framebuffer down to 640x480 for video output by the PVR.
Then, the TV will stretch the 640x480 image back to 853x480.

Notice that is why we actually see more of the world to the left and right of the characters in the screens you posted there.

And BlueCrab is right, in 3D vertex submission, the only difference is the perspective matrix.
That is how I enable the option in my game engine:
viewtopic.php?f=29&t=102506&p=1047897#p1047897

But my guess is you do not transform your 2D vertices, submitting your sprites in the range of (0->640 , 0->480)

Basically, you need to scale your vertices' x component so that when stretched out by your TV into WideScreen, your desired pixel ratio is preserved.

One way to do this would be to re-organize your sprites for a 853x480 display.
Then, when submitting the vertices, do a simple transform on the x component like:

Code: Select all

x = (x * 640.0f) / 853.0f
To scale the vertices from 0->853 back to 0->640.
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Widescreen hacks

Post by bogglez »

Any comment on how this affects anti-aliasing?
The DC will anti-alias horizontally, so I was wondering how stretching the image horizontall affects AA of edges.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Post Reply