xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> The Black Screen Syndrom
openxdkman
post Dec 12 2006, 04:52 PM
Post #1


X-S Genius
****

Group: Moderator
Posts: 822
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



When you compile a xna program you can find the .exe binary in bin\x86\Debug

If you are just a player, be warned that if you try to run a program by compiling its source you may be completely stuck with a black screen. Alt+F4 won't stop the program. You will have to try to kill the right task by doing Ctrl+Alt+Suppr then Enter, but with a black screen you may kill the wrong task. Quite a nightmare...

The solution is, even if sources are given to you, to test the .exe binary first (if you don't have it, compile it with F6 but do not use F5 because F5 will compile then run.

If you get stuck with black screen after launching a xna .exe binary then just hit Alt+F4 to kill it.

It seems developers out there only run their program on xbox360 or high res Windows and they just produce black screen if screen resolution is not appropriate under Windows. A lots of progress needs to be made in that domain...

Note that all existing xna games around (except spacewar) crashed or produced black screen.
Just like if things created with beta xna had no chance to work on Windows with final xna (at least in my config)... Developers really need to autodetect things and avoid crashes or black screens...
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
openxdkman
post Dec 14 2006, 04:16 PM
Post #2


X-S Genius
****

Group: Moderator
Posts: 822
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



I've found this post in official xna forums (about black screen in full screen mode)

<< (from Arnd. G.)
Hi,

I had the same problem. But my Iiyama Vision Master reported "Fast Signal".

In DirectX Utility "Caps Viewer" I found below "Display Modes" different Refresh Rates which are not "good" for my monitor (e.g. 800x600 @ 240 Hz).

Fortunatelly with the DirectX Utility "Control Panel" -> Direct Draw you can switch the "Forced Refresh Rate from "Auto" to a value like "75".

Viola, the FullScreenToggle works!

Regards,

Arnd
>>

That means there is an awful issue in xna gse. It lets directdraw choose highest possible refreshrate.
In most case that will be too much for your screen, and so the black screen.

The worst is that they marked the case solved. Which means they gladly think mere players will install also (in joy) directX SDK (as if installing visual c sharp was not bad enough). Well I say so because I assume the utilities refered above are found in that SDK. I will check that now.


That other post looks promising, I will try also.

<< (from Shawn Hargreaves - MSFT)
Answer Re: Why does XNA render at 75 Hz in fullscreen?
Was this post helpful ?


By "runs at 75 hz" do you mean that the monitor refresh rate is being set to 75, or that we are calling your Draw function at 75?

My guess would be that we're just using the default monitor refresh rate. If you want to change that you can hook the GraphicsDeviceManager.PreparingDeviceSettings event, and modify the args.GraphicsDeviceInformation.PresentationParameters.FullScreenRefreshRateInHz property.
>>

This post has been edited by openxdkman: Dec 14 2006, 04:18 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
openxdkman
post Dec 14 2006, 04:50 PM
Post #3


X-S Genius
****

Group: Moderator
Posts: 822
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



Ahhhh... Finally, that damn black screen syndrome in full screen mode can be fixed manually in code.


For example, in Spacewar starter kit, replace

void PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
// We turn off auto depth buffer creation when scaling output.
//
e.GraphicsDeviceInformation.PresentationParameters.EnableAutoDepthStencil = !enableDrawScaling;
}

with

void PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
// We turn off auto depth buffer creation when scaling output.
//
e.GraphicsDeviceInformation.PresentationParameters.EnableAutoDepthStencil = !enableDrawScaling;
#if XBOX360
#else

if (e.GraphicsDeviceInformation.PresentationParameters.IsFullScreen)
e.GraphicsDeviceInformation.PresentationParameters.FullScreenRefreshRateInHz = 60;
#endif
}


I will look for a way to improve this patch (better to detect the current windows desktop resolution refreshrate and keep it for full screen mode)

Damn... Without fullscreen mode there was no way to reach top 3D performance on Windows... How come mere beginners have to handle this issue after MONTHS of beta!?!


This post has been edited by openxdkman: Dec 14 2006, 04:51 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
openxdkman
post Dec 14 2006, 05:18 PM
Post #4


X-S Genius
****

Group: Moderator
Posts: 822
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



With this you can set in fullscreen mode the same refreshrate as the one detected in windowed mode :
(you can still force its value though if you wish)
It's for Spacewar starter kit (file SpacewarGame.cs)

At line 30, add a new variable

private int preferredRefreshRate = 0;
//0 will mean you want to set this variable when we are in windowed
//mode and reuse it later when we go back to fullscreen mode



replace

void PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
// We turn off auto depth buffer creation when scaling output.
//
e.GraphicsDeviceInformation.PresentationParameters.EnableAutoDepthStencil = !enableDrawScaling;
}

with


void PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
// We turn off auto depth buffer creation when scaling output.
//
e.GraphicsDeviceInformation.PresentationParameters.EnableAutoDepthStencil = !enableDrawScaling;

#if XBOX360
#else
if (e.GraphicsDeviceInformation.PresentationParameters.IsFullScreen)
{
if (preferredRefreshRate!=0)
e.GraphicsDeviceInformation.PresentationParameters.FullScreenRefreshRateInHz = preferredRefreshRate;
else //we never went in windowed mode before, dunno what is refreshrate yet
e.GraphicsDeviceInformation.PresentationParameters.FullScreenRefreshRateInHz = 60;
}
#endif
}



finally, replace

// going fullscreen, use desktop resolution to minimize display mode changes
// this also has the nice effect of working around some displays that lie about
// supporting 1280x720
GraphicsAdapter adapter = graphics.GraphicsDevice.CreationParameters.Adapter;
graphics.PreferredBackBufferWidth = adapter.CurrentDisplayMode.Width;
graphics.PreferredBackBufferHeight = adapter.CurrentDisplayMode.Height;

with

// going fullscreen, use desktop resolution to minimize display mode changes
// this also has the nice effect of working around some displays that lie about
// supporting 1280x720
GraphicsAdapter adapter = graphics.GraphicsDevice.CreationParameters.Adapter;
graphics.PreferredBackBufferWidth = adapter.CurrentDisplayMode.Width;
graphics.PreferredBackBufferHeight = adapter.CurrentDisplayMode.Height;
if (preferredRefreshRate==0) preferredRefreshRate = adapter.CurrentDisplayMode.RefreshRate;


Ok... now we can have fun!

This post has been edited by openxdkman: Dec 14 2006, 05:19 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 21st May 2013 - 08:07 AM