zeldin / SDL_PSL1GHT_Libs

series of patch and build scripts to build several SDL extension libraries for use with SDL_PSL1GHT, libs are SDL_gfx, SDL_ttf and SDL_image
11 stars 9 forks source link

This belongs on SDL_PSL1GHT, but I can't open an issue there #2

Closed CrashSerious closed 13 years ago

CrashSerious commented 13 years ago

When trying to make my application work in different resolutions than the PS3 is set to, I get a "black screen". (Lower resolutions, not higher) It used to work before the HG commits. :(

Now, if I do not manually set the PS3 to only 480p the following line will generate what looks like a DUMP on my DEX:

screen = SDL_SetVideoMode(720, 480, 32, SDL_SWSURFACE|(fullscreen?SDL_FULLSCREEN:0));

If I do the following with the PS3 set at 720p, then it works:

screen = SDL_SetVideoMode(1280, 720, 32, SDL_SWSURFACE|(fullscreen?SDL_FULLSCREEN:0));

Unfortunately, I need to set a specific resolution. Here is a pastie of the dump from my DEX unit:

http://pastebin.com/CaxYhnQH

zeldin commented 13 years ago

Does it work if you do not use "SDL_SWSURFACE"?

CrashSerious commented 13 years ago

No, that doesn't work either. (just tried it)

I will have to look at the code closer today after I get home, specifically PSL1GHT_SetDisplayMode, but in looking at it last night it looks like it doesn't even use the supplied resolution and only uses the current resolution.

This used to at least display before the HG commits though, meaning it didn't do a RSX dump (AFAIK) because it would still display.

zeldin commented 13 years ago

It looks like a window of 640x480 works fine, but 720x480 does not. My guess would be some kind of alignment problem, probably in PSL1GHT_RenderCopy(). @bgK: Are you aware of any such alignment restrictions? Maybe window centering should be implemented by manipulating the renderer viewport instead of the pixels pointer?

zeldin commented 13 years ago

@CrashSerious: Could you please try building from my branch window-centering and see if it fixes your problem?

bgK commented 13 years ago

Some DMA transfer / 2d blit functions indeed have a 0x64 alignment requirement. Not all of them though IIRC ... The new centering code seems much less hackish, by the way!

CrashSerious commented 13 years ago

I'll have to look at the branch, zeldin. I'll try that tonight for 20 or 30 minutes.

However, when I set the resolution to 640x480 it atleast didn't lock up. It displays, and displayes centered... seems like maybe a SVGA holdover?

But the real resolution of the screen is much higher becasue it's not taking up nearly as much screen real estate as if the Debug session was set to 480p (like a real 480p display would be). Unfortunately, this is impactful in a real big way if you set the screen to 1080i/p. The image becomes so tiny that it isn't even readable, so it's not really changing the resolution of the display, it's just faking it by centering the screen.

CrashSerious commented 13 years ago

Update: the window centering branch does (at least) not generate an RSX dump, but the display looks as it does above in 720p. It's just centered on a screen that is 720p, which makes the image much smaller than it should be via the resolution specified when the surface is created.

When switching to 480p in debug the same resolution takes all of the available screen real estate, as it should.

CrashSerious commented 13 years ago

@Zeldin @bgK

I put commit https://github.com/zeldin/SDL_PSL1GHT/commit/6ed03ecbb7d8cdf24875ce4812485f35445f715f (zeldin's window branch) into my branch along with adding SDL_FULLSCREEN in my application's init of the video mode, this makes the surface look correct on the display. Even though it actually doesn't change the display resolution as I expected it would.

I can't send a pull request because my branch is a mixture of two other issues I'm working on ATM:

  1. bgK's rewrite of my keyboard driver per zeldin's specifications (still need to fix keyboard repeating)
  2. 8 Bit audio isn't supported or emulated like in other drivers. (This is needed for ports with sound)
zeldin commented 13 years ago

I'm not quite sure what you are expecting, but the intended behaviour is

In either case you get a drawing area of the size you specify. So if it's much smaller than the entire screen of course it will be "tiny". If you want a drawing area that covers the full screen, you use SDL_FULLSCREEN, duh... :-)

zeldin commented 13 years ago

Pushed new centering code to master, so closing this issue.